Hi,
I have been trying to use programmatic binding based on the following demo https://demos.telerik.com/aspnet-ajax/grid/examples/data-binding/client-side/programmatic/defaultcs.aspx but have been having a problem in getting the key value back into the asp.net code behind.
The code is (effectively) the same as the example except I am binding to an entity that has a Guid as a key rather than the EmployeeId in the example and I have added a "delete" button using the following
<telerik:GridButtonColumn UniqueName="DeleteButtonColumn" ButtonType="ImageButton" CommandName="Delete" ConfirmText="Are you sure?" ConfirmDialogType="Classic" ConfirmTitle="Are you sure?" />
I have set up the DataKeyNames and ClientDataKeyNames in the MasterTableView to be DataKeyNames="GUID" and ClientDataKeyNames="GUID"
In the code behind I have added an ItemCommand event that gets called, however
(GridDataItem)e.Item.GetDataKeyValue("GUID") is blank
(GridDataItem)e.Item.KeyValues contains "{GUID:""""}"
Can I use programmatic binding method with a GridButtonColumn with type ImageButton in this way?