I have a grid that displays its details in a Nested FormView. When in EditMode I am trying to set a RadDateTimePIcket selecteddate property to the database column IF it has one. Some have no value so I want it to default to Now() or NOTHING.
I am getting a "Object reference not set to an instance of an object." error when trying to do it like this:
It does not like the line I arrowed to above. What am I missing here?!?
I am getting a "Object reference not set to an instance of an object." error when trying to do it like this:
ElseIf (e.CommandName = "Edit") Then |
Dim Event_Control As RadDateTimePicker = form_AppNotes.Row.FindControl("txt_event_date") |
-->Dim Event_Date As String = (TryCast(form_AppNotes.Row.FindControl("txt_event_date"), RadDateTimePicker)).SelectedDate.ToString |
Event_Control.SelectedDate = IIf(GenericFunctions.DoIExist(Event_Date) = False, Now, FormatDateTime(Event_Date)) |
End If |
It does not like the line I arrowed to above. What am I missing here?!?
<telerik:RadDateTimePicker ID="txt_event_date" Runat="server" Skin="Sunset" SelectedDate='<%# Bind("event_date") %>'> |