Telerik radgrid select item after insertion

Im programmatically changing the dataSource of the grid by inserting an element into the list. Then I Rebind on RadGrid. I have the id of a newly inserted object. Then I would like to select this row in the grid. How can I do this from code?

thanks for the help

+4
source share
1 answer

You must set the ID as DataKeyNames="yourID" for your grid. Then you can get it in the code behind and set it like this:

 GridDataItem gdiItem = RarGrid1.MasterTableView.FindItemByKeyValue("yourID", yourIDValue); gdiItem.Selected = true; 
+7
source

Source: https://habr.com/ru/post/1386654/


All Articles