Hi,
I have a issue at the moment which I can't seem to fix.
Basically I have my own custom edit form which looks like this:
This works fine when editing a record, but if I click 'Add new record' I get this error message:
System.InvalidCastException: Specified cast is not valid.
It points to the RadDatePicker and I found that if I remove the SelectedDate it works fine. But I need the selected Date when editing an existing record.
Could someone tell me (which I assume is simple!) how to resolve this?
I have a issue at the moment which I can't seem to fix.
Basically I have my own custom edit form which looks like this:
<EditFormSettings EditFormType="Template"> <FormTemplate> <div style="padding: 5px;"> <telerik:RadDatePicker ID="RadDatePicker1" SelectedDate='<%# Bind( "HolidayDate" ) %>' runat="server" /><br /> <asp:LinkButton ID="Button1" Text='<%# Iif (TypeOf Container is GridEditFormInsertItem, "Insert", "Update") %>' runat="server" CommandName='<%# Iif (TypeOf Container is GridEditFormInsertItem, "PerformInsert", "Update") %>' /> <asp:LinkButton ID="Button2" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel" /> </div> </FormTemplate></EditFormSettings>This works fine when editing a record, but if I click 'Add new record' I get this error message:
System.InvalidCastException: Specified cast is not valid.
It points to the RadDatePicker and I found that if I remove the SelectedDate it works fine. But I need the selected Date when editing an existing record.
Could someone tell me (which I assume is simple!) how to resolve this?