:: Forum >>

After grid sort how to get display column values?

How do you get the display column values after the grid has been sorted? As it stands for me. Any calls to grid.getCellValue(col, row) return the data before sorting.

Is there a way to get the display column values after sorting a grid?
JohnnyA
Monday, February 21, 2011
I am trying to implement a move to the next record. I am using an external counter to keep track of the current row the user selected. When the user clicks the next button I created I need to increment my counter by one and get the data from the next row cell.

Even using grid.getRowPosition(var) doesn't seem to work.

JohnnyA
Monday, February 21, 2011
how do i know
Tuesday, February 22, 2011
Maybe :grid.getCellValue(this.getRowPosition(col, row)); ??
Tuesday, February 22, 2011
grid.getCellValue(col, this.getRowPosition(row));
Tuesday, February 22, 2011
Thanks for the reply.
grid.getCellValue(col, this.getRowPosition(row)); works if row is the original position. if you do grid.getCellValue(col, this.getRowPosition(row)); where row is a counter starting at the last selected row (lets say 2). if you increment that counter to 3; you do not get the cell value that is currently at position 3.

Any other thoughts?

Thanks!
JohnnyA
Tuesday, February 22, 2011
Then you should use getRowIndices() and search the next row-position in the indices array.
Tuesday, February 22, 2011
Unsure, but try combinations of:
grid.getCellValue(col, this.getRowPosition(this.getRowIndices(row)+1));
Tuesday, February 22, 2011
found a working solution but it does require that you keep the id/key you are using visible within the grid as a column. I would like to find a solution where you don't have to keep the id visible within the grid but this works.

grid.getCellValue(col,grid.getRowIndices()[rowPosCounter]))
JohnnyA
Wednesday, February 23, 2011

This topic is archived.


Back to support forum

Forum search