Hello,
"selectRow " method right now accepts only row number. How can I find it if I know primary key value for that row? Basically, I want to select row by its primary key value.
Martin, with your code it is possible to find row element, but after this code is executed '$("#grid1").igGridSelection("selectRow", index);' there is no row highlighted in the grid.
Also, is there more efficient way to do that? Because it could be a situation that there will be 1000 rows and I need to select row with index 900. So looping through all of them is inefficient. Another question is - will it be possible to use your method if visualization is turned on for the grid?
Hi adogg,
Here is one method to do this:
Hope this helps,
Martin Pavlov
Infragistics, Inc.
Martin, that worked. But then, how can I get row index to pass to 'selectRow' method?
You should use igGrid method findRecordByKey.
Here is the example code:
var record = $(".selector").igGrid("findRecordByKey", 4);
In order for this method to work primaryKey option of the grid should be set.