PDA

View Full Version : Equivalent of ColumnModel.getDataIndex for a row?



davida
15 Dec 2006, 8:02 AM
I'm assuming that getDataIndex is used to map from the view's column index back to the data model's column index. Is there an equivalent for the row? That is, after the grid has been sorted, is there a way to map a row on the view back to the original row on the data model?

Or if that's not possible, is there a way to find a row by its ID field? I know I can do the opposite - getRowId(rowIndex) - but is there a way to do getRowIndex(rowId)?

Thanks

jack.slocum
15 Dec 2006, 9:58 AM
grid.getRowsById(id/array) will return rows by id. The row object has property rowIndex.