Welcome Guest Search | Active Topics | Sign In | Register

DateTime Picker Options
Tracey
Posted: Wednesday, March 23, 2011 5:02:59 PM
Rank: Newbie
Groups: Member

Joined: 3/23/2011
Posts: 3
I am adding your date and time picker to a gridview to update a date time field in SQL database. I can get the picker to display the date and time in the database but I cannot get it to updated the database. How can I take the data from the field and put it into a variable to update the database with?
eo_support
Posted: Wednesday, March 23, 2011 5:17:03 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

I believe you can use ASP.NET data binding expression to do that, however the detail is unrelated to our product thus is beyond the scope of our support. If you search online you should be able to find plenty of information about that topic. Just think our DatePicker as a simple TextBox. It takes a DateTime value and gives you back a new one if user has changed it. It does not deal with your data source directly.

Thanks!
Tracey
Posted: Monday, March 28, 2011 1:14:45 PM
Rank: Newbie
Groups: Member

Joined: 3/23/2011
Posts: 3
I have tried to use your datePicker as a textbox but I get this error

Unable to cast object of type 'EO.Web.DatePicker' to type 'System.Web.UI.WebControls.TextBox'.

Any ideas?
eo_support
Posted: Monday, March 28, 2011 1:24:05 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

We are not asking you to cast the DatePicker. We are asking you "think" they are the same conceptually. They are conceptually similar because both takes a value and let users to modify it. That means your code structure would be the same regardless whether you are working with DatePicker or a TextBox. However having the same structure doesn't mean having the exact same code. These two are obviously two totally different animals and you simply can not cast one to another.

Thanks
Tracey
Posted: Monday, March 28, 2011 3:10:41 PM
Rank: Newbie
Groups: Member

Joined: 3/23/2011
Posts: 3
this worked perfect

'Sends the value of the Transaction date/time box, clock in date/time box, and clock out date/time box to a variable
transDateValue = transDate.SelectedDate
ClockInValue = ClockIn.SelectedDate
ClockOutValue = ClockOut.SelectedDate


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.