<telerik:RadGrid ID="radGrid" runat="server" AllowPaging="true" AllowCustomPaging="True"
GridLines="None" PageSize="20" AllowMultiRowSelection="true" ClientSettings-Selecting-AllowRowSelect="true"
AutoGenerateColumns="false" onneeddatasource="radGrid_NeedDataSource" OnItemCreated="radGrid_ItemCreated"
OnItemDataBound="radGrid_ItemDataBound" OnItemCommand="radGrid_ItemCommand"
DataKeyNames="ClientID">
<mastertableview datakeynames="ID" gridlines="None" width="100%">
<PagerTemplate> and so on ... </telerik:RadGrid>
Scenario: - di cui sopra è il markup di un Telerik RagGrid di controllo che sto usando. Ho provato ad accedere al KeyValue del GridColumn, come di consueto,Come recuperare 'KeyValue' da Telerik RadGrid?
Int32 key = Convert.ToInt32((e.Item as GridDataItem).GetDataKeyValue("ID"));
Questo non funziona. C'è un sostituto?
Perché si specifica la proprietà 'DataKeyNames' su RadGrid? Prova a rimuoverlo e conservalo solo per 'MasterTableView' –