Hi,
I have a user control that contains a webdatepicker. This user control is displayed many times in a customerItemTemplate inside a webdatagrid.
when you click the webdatepicker, nothing appears. If i cause a postback, then all the datepickers work.
What is causing this?
The possible reason: template with WebDatePicker is instantiated too late. In order to create shared drop-down calendar the Page.OnLoadComplete is used. If template is instantiated after that event, then shared calendar will fail. After postback the order of server events is changed, template instantiated early and calendar becomes available.
To get around that, application should add to page a WebMonthCalendar and set its ID to DropDownCalendarID of WebDatePicker. In this case there will be no need to create shared drop-down.
Latest version of WebDatePicker has new static public method EnsureSharedCalendar. If that method is called, then shared calendar is created unconditionally. Below is example:
protected void Page_Load (System.Object sender, System.EventArgs e) { Infragistics.Web.UI.EditorControls.WebDatePicker.EnsureSharedCalendar(this); }