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

RadDatePicker inside DataList

1 Answer 63 Views
This is a migrated thread and some comments may be shown as answers.
Mohammed Ahmed
Top achievements
Rank 1
Mohammed Ahmed asked on 03 Jan 2009, 02:32 AM
I want to save the the selected date from the RadDataPicker within the datalist to the database here is the code I have

from aspx side


<asp:DataList ID="someid" runat="server" RepeatLayout="Table" ItemStyle-Width="300px"



RepeatColumns="2" RepeatDirection="Vertical"



DataKeyField="somekeydata" >












<td class="label" colspan="8">


some info














<ItemStyle />







<asp:Label ID="someid2" runat="server" Text=<%#Eval("somedata")%>></asp:Label>



<asp:Label ID="someid3" runat="server" Text=<%#Eval("somedata")%> ></asp:Label>:




<img id="someid4" runat="server" src="images/someimage.gif" alt="some alt." align="absmiddle"



border="0" height="10" />



<telerik:RadDatePicker ID="RadDate1" Runat="server" DbSelectedDate='<%#Bind("dates")%>' >










Cs file



private RadDatePicker getdate= new RadDatePicker();






void Save_Click(object sender, EventArgs e)







foreach (DataListItem ls in someid.Items)




int key= (int)someid.DataKeys[ls.ItemIndex];


getdate= (




object somevariable = Convert.ToDateTime(getdate.SelectedDate); //each time the date is null












I really appreciate for your help.


1 Answer, 1 is accepted

Sort by
Telerik team
answered on 07 Jan 2009, 06:39 AM
Hello Mohammed,

One possible option in this case would be to use the client side api of the control, and trigger an AjaxRequest to the server. For example, when a selection is made, you can go to the server via an AjaxRequest, and persist the selected value in the database, or add it to the list.

Best wishes,
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Asked by
Mohammed Ahmed
Top achievements
Rank 1
Answers by
Telerik team
Share this question