PDA

View Full Version : Determining record from row index in grouping grid



robert patterson
9 Aug 2009, 10:40 AM
I can get the row index when a row is clicked but I can't see how to determine which record is showing in that row since the grouping grid puts records in a different order than in the datastore.

I have a select element on each line of the grid and they tell which record is clicked but when the grid row is clicked I get only the row index.

Thanks for any help.

Animal
9 Aug 2009, 9:36 PM
It should work. It uses an internal row indexing system, so any group header rows are omitted.

Condor
9 Aug 2009, 11:55 PM
This still works in a grouped grid:

var rowIndex = grid.getView().findRowIndex(el);
if(rowIndex){
var record = grid.getStore().getAt(rowIndex);
}