Hi,
How can I change DataBinder.Eval to Container.DataItem)["Value"] if grid is binding from data table.
<%#((System.Data.DataRowView)Container.DataItem)["Value"] %> is working fine in ItemTemplate but not in EditItemTemplate.
line of code which is not working.
<EditItemTemplate>
<asp:TextBox ID="txtRestrictValue" runat="server" MaxLength="200" Text='<%#((System.Data.DataRowView)Container.DataItem)["Value"] %>'></asp:TextBox>
</EditItemTemplate>
it gives following error:
Unable to cast object of type 'Telerik.Web.UI.GridInsertionObject' to type 'System.Data.DataRowView'.
Warm Thnaks
Reyaz
How can I change DataBinder.Eval to Container.DataItem)["Value"] if grid is binding from data table.
<%#((System.Data.DataRowView)Container.DataItem)["Value"] %> is working fine in ItemTemplate but not in EditItemTemplate.
line of code which is not working.
<EditItemTemplate>
<asp:TextBox ID="txtRestrictValue" runat="server" MaxLength="200" Text='<%#((System.Data.DataRowView)Container.DataItem)["Value"] %>'></asp:TextBox>
</EditItemTemplate>
it gives following error:
Unable to cast object of type 'Telerik.Web.UI.GridInsertionObject' to type 'System.Data.DataRowView'.
Warm Thnaks
Reyaz