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

Data Binding in a Rad Calender

1 Answer 41 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Kunal
Top achievements
Rank 1
Kunal asked on 18 Dec 2008, 01:25 PM
Hi All,
This is Kunal from Bangalore.
I am using a rad Date Time Picker inside my rad grid.
I wasnt to know as to how can I associate the rad Date Time Picker column to a data field.
I am using a Stored procedure from the code behind to bind the rad grid.
I am using the following assembly:

Assembly

="RadCalendar.Net2"

 


And this is the peice of code that I have written.

<

rad:GridTemplateColumn HeaderText = "test Time" UniqueName="Test_Time" DataField="BEGINTIME">

 

 

<EditItemTemplate>

 

 

<radCln:RadDateTimePicker ID="radCal" runat="server" Culture="English (United States)" >

 

 

 

<DateInput runat="server" />

 

 

</radCln:RadDateTimePicker>

 

 

</EditItemTemplate>

 

 

</rad:GridTemplateColumn>

 

 


Please specify related pointers.

Regards,
Kunal






1 Answer, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 19 Dec 2008, 04:09 PM
Hello Kunal,

You can use the DbSelectedDate property of the RadDateTimePicker control in order to bind it as shown below:

<EditItemTemplate> 
    <telerik:RadDateTimePicker id="picker1" MinDate="2006/1/1" runat="server"   
        DbSelectedDate='<%# Bind("Dates") %>'>  
    </telerik:RadDateTimePicker> 
</EditItemTemplate> 

Find more about RadCalendar data-binding in the following online resources:

http://demos.telerik.com/aspnet-ajax/Calendar/Examples/DatePicker/DataBinding/DefaultCS.aspx
http://demos.telerik.com/aspnet-ajax/Calendar/Examples/DateTimePicker/DataBinding/DefaultCS.aspx

Let me know if this helps.

Regards,
Iana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Calendar
Asked by
Kunal
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Share this question
or