*ADMIN - Can you please move this to the Grid forum, as it's not just the datepicker with this problem. This problem exists in the grid.
I have a usercontrol being used for my radgrid insert/edits. It's defined like so:
Within the user control exists a RadDatePicker. WIthin that datpicker I have the following tag:
I have the following property that populates that onclick:
My togglepopup js function:
Immediately after the datepicker control I have a cancel button:
Now, my onclick will work for dropping down the calendar control when I first hit the page. However, if I cancel the insert with my cancel button, and go back to insert another record again, my $find has come back empty. I've checked and the id value is absolutely correct. I can do a getElementById and get the DOM object, but of course I still have no reference to the calendar component or it's showPopup method. I thought it might just be the DateInput onclick problem, but upon further inspection, even the calendar button doesn't work at that point. Here is my complete calendar code:
Thank you in advance!
EDITED TO SAY: I've duplicated this functionality in the Template mode as well. Also, after the cancel and hit "Add new Record", none of the controls are working correctly (my RadComboBox no longer works).
I have a usercontrol being used for my radgrid insert/edits. It's defined like so:
| <EditFormSettings UserControlName="~/_controltemplates/OKS/EstimateAdd.ascx" EditFormType="WebUserControl"> |
| <EditColumn UniqueName="EditCommandColumn1"> |
| </EditColumn> |
| </EditFormSettings> |
Within the user control exists a RadDatePicker. WIthin that datpicker I have the following tag:
| <DateInput onclick='<%= DatePickerID %>' DateFormat="D"> |
I have the following property that populates that onclick:
| public string DatePickerID |
| { |
| get { return "ToggleSecondPopup('" + dpRequiredEstimateCompletion.ClientID + "');"; } |
| } |
My togglepopup js function:
| function ToggleSecondPopup(id) { |
| $find(id).showPopup(); |
| } |
Immediately after the datepicker control I have a cancel button:
| <asp:Button runat="server" Text="Cancel" CommandName="Cancel" ID="cmdCancel" /> |
Now, my onclick will work for dropping down the calendar control when I first hit the page. However, if I cancel the insert with my cancel button, and go back to insert another record again, my $find has come back empty. I've checked and the id value is absolutely correct. I can do a getElementById and get the DOM object, but of course I still have no reference to the calendar component or it's showPopup method. I thought it might just be the DateInput onclick problem, but upon further inspection, even the calendar button doesn't work at that point. Here is my complete calendar code:
| <telerik:RadDatePicker ID="dpRequiredEstimateCompletion" Style="vertical-align: middle;" Width="200px" |
| runat="server" DatePopupButton-ImageUrl="/images/calendar.gif" DatePopupButton-HoverImageUrl="/images/calendar.gif"> |
| <DateInput onclick='<%= DatePickerID %>' DateFormat="D"> |
| </DateInput></telerik:RadDatePicker> |
Thank you in advance!
EDITED TO SAY: I've duplicated this functionality in the Template mode as well. Also, after the cancel and hit "Add new Record", none of the controls are working correctly (my RadComboBox no longer works).