Code Project

Link Unit

Monday, April 05, 2010

Skin not Applied to RadDatePicker inside UpdatePanel

We were facing this issue where the skin was not applied to the RadDatePicker , in case it is placed inside an UpdatePanel. After searching for a solution it was observed that atleast one DatePicker Control should be placed outside the UpdatePanel. Now the rest of the process becomes easy , we need to hide that dummy Datepicker control once the rendering is complete.
Code in aspx file

<aspx:updatepanel id="UpdatePanel1" runat="server">
<contenttemplate>
<!-- Put your content here -->
</contenttemplate>

</aspx:updatepanel>
<radcln:raddatepicker id="radDt" runat="server" displaydateformat="dd-MMM-yyyy" dateformat="dd-MMM-yyyy" width="100px" mindate="1/Jan/1900"></radcln:raddatepicker>

In code behind.
protected void Page_PreRenderComplete(object sender, EventArgs e)
{
radDt.Visible = false;
}
we can put the aspx and code behind segments in .master page , so all pages reflect the same.
Hope this helps.
Post a Comment