Data Binding in a Rad Calender

2 posts, 0 answers
  1. Kunal
    Kunal avatar
    14 posts
    Member since:
    Dec 2008

    Posted 18 Dec 2008 Link to this post

    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






  2. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 19 Dec 2008 Link to this post

    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.
Back to Top