Hi,
I am trying to get an item in Radgrid using datakeyvalue like this:
I have done on aspx page like this:
<MasterTableView DataKeyNames="ID">
</MasterTableView>
There are many other columns bound.
int IDValue = 85;
GridDataItem item = RadGrid1.MasterTableView.FindItemByKeyValue("ID", IDValue);
This returns item as null. When I check RadGrid1.Items.Count. It is returning number of rows in the grid in immediate window. So, to trouble shoot, I found out which item has ID as 85 and then in immediate window in asp.net I did this:
RadGrid1.Items[25].Cells[6].Text
This one is returning me the value. That means there is an item with ID value as 85 in the grid
why is Master table code is not working.
Thanks,
Prathiba.
I am trying to get an item in Radgrid using datakeyvalue like this:
I have done on aspx page like this:
<MasterTableView DataKeyNames="ID">
<
telerik:GridBoundColumn AllowFiltering="False" DataField="ID" Groupable="False" HeaderText="ID" ReadOnly="True" Reorderable="False" ShowFilterIcon="False" UniqueName="ID" Display="false">
<ColumnValidationSettings>
<ModelErrorMessage Text="" />
</ColumnValidationSettings>
</telerik:GridBoundColumn>
</MasterTableView>
There are many other columns bound.
int IDValue = 85;
GridDataItem item = RadGrid1.MasterTableView.FindItemByKeyValue("ID", IDValue);
This returns item as null. When I check RadGrid1.Items.Count. It is returning number of rows in the grid in immediate window. So, to trouble shoot, I found out which item has ID as 85 and then in immediate window in asp.net I did this:
RadGrid1.Items[25].Cells[6].Text
This one is returning me the value. That means there is an item with ID value as 85 in the grid
why is Master table code is not working.
Thanks,
Prathiba.