This is a migrated thread and some comments may be shown as answers.

Display time from database based on date

1 Answer 45 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
pandu
Top achievements
Rank 1
pandu asked on 13 Mar 2009, 03:54 PM
I need to display time span times from the database, based on the day selected.
Are there are any samples do the same?

For example, i have batch runs happens 3/9/2009  9 AM, 3/9/2009  11 AM, 3/9/2009  3PM, 3/9/2009  4PM, 3/9/2009  xy time.

Based on the user selected date 3/9/2009, I need to display batch execution times for that 3/9/2009, in time picker time span or some drop down.. Once user selects the time (say 3 PM), I need to bind this to database (3/9/2009 3 PM) and pass this value to generate a report...

Any ideas or sample code greatly appreciated.. 

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 17 Mar 2009, 10:56 AM
Hello Pandu,

Binding a RadDateTimePicker to a data source is easy provided you use the DbSelectedDate property (in a similar way as with the RadDatePicker control).

Binding the RadDateTimePicker control which is in a RadGrid template column:

  <EditItemTemplate>
     <telerik:RadDateTimePicker ID="picker1" runat="server" DbSelectedDate='<&# Bind("Dates") &>'>
     </telerik:RadDateTimePicker>
  </EditItemTemplate>

For more information please refer to the following articles:
Help topic
Data Binding
Binding to Custom Collection

Best wishes,
Pavlina
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Calendar
Asked by
pandu
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or