I have been given a page where all the colums are defined in the front end code. I have always built my tables up in the code behind and never had a problem extracting values from the table. Here is an example of a column that i am having difficulty getting a value from:
In the code behind, here is the code i am attempting to use, this works on pages where i have defined the columns in the code behind:
I have also tried to explicity accces the control (this works for other controls on this page):
The date always comes back as 00/00/0001 or null despite a date being picked in the control. Any help on this would be greatly appreciated
<telerik:GridTemplateColumn HeaderText="Effective From" UniqueName="EffectiveFromEdit" Visible="false"><ItemTemplate><telerik:RadDatePicker ID="rdpMinDateEdit" runat="server" Width="140px" DateInput-EmptyMessage='<%#DataBinder.Eval(Container.DataItem,"EffectiveFrom") %>' MaxDate="01/01/3000" EnableEmbeddedSkins="false" Skin="247"><Calendar ID="Calendar1" runat="server" EnableEmbeddedSkins="false" Skin="247" UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False" ViewSelectorText="x"> </Calendar><DateInput ID="DateInput1" runat="server" DateFormat="dd/MM/yyyy" DisplayDateFormat="dd/MM/yyyy"EmptyMessage=""></DateInput><DatePopupButton HoverImageUrl="" ImageUrl="" /></telerik:RadDatePicker> </ItemTemplate> </telerik:GridTemplateColumn>In the code behind, here is the code i am attempting to use, this works on pages where i have defined the columns in the code behind:
GridEditableItem UpdateItem = (GridEditableItem)e.Item;fmsdupdate.EffectiveTo = Convert.ToDateTime((UpdateItem["EffectiveToEdit"].Controls[0] as RadDatePicker).SelectedDate);I have also tried to explicity accces the control (this works for other controls on this page):
fmsdupdate.EffectiveFrom = Convert.ToDateTime (((RadDatePicker)UpdateItem.FindControl("rdpMinDateEdit")).SelectedDate);The date always comes back as 00/00/0001 or null despite a date being picked in the control. Any help on this would be greatly appreciated