Hi
Here's 2 different typed columns. Both have DataField specified
<telerik:GridBoundColumn DataField="ID" UniqueName="ID" Visible="False" > |
</telerik:GridBoundColumn> |
<telerik:GridTemplateColumn DataField="Name" HeaderText="Name" UniqueName="NameColumn"> |
<ItemTemplate><%# DataBinder.Eval(Container.DataItem, "Name") %></ItemTemplate> |
<EditItemTemplate> |
<asp:TextBox ID="tbName" runat="server" SkinID="GeneralTextBox" Text='<%# DataBinder.Eval(Container.DataItem, "Name") %>'></asp:TextBox> |
</EditItemTemplate> |
</telerik:GridTemplateColumn> |
However only "ID" exists in SavedOldValues collection (ItemCommand event):
Telerik.Web.UI.GridDataItem dataItem = e.Item as Telerik.Web.UI.GridDataItem; |
dataItem.SavedOldValues["ID"] //this always have a value |
dataItem.SavedOldValues["Name"] // this is not exists |
Why 'Name' is not contains in SavedOldValues collection when I use GridTemplateColumn?
I'm forced to do selection from dataset by ID to get original 'Name' value