Hi,
I am using data grid with scrollview, filter and cell editing plugins.
I have a lot of rows, so I set scrollview and pageSize= 500 : it works well, I can load locally ten thousand rows really fast.
I have a specific column as absolute identifier, so I set idField.
when I sort by a column, I'd like to highlight (select) a specific row: I can't use the "index" param, because it is relative to the current page
so I used this system:
in OnSortColumn event:
// count the number of pages
var numpages= parseInt(o.datagrid('getData').total / o.datagrid('options').pageSize) +1;
var index= -1;
//loop while I get the desired row
for(var i=0; i<= numpages && index ==-1; i++)
{
o.datagrid('gotoPage',i);
index= o.datagrid('getRowIndex',myId) ;//if the row is Not in that page,index returns -1
}
problem is that if there is more than 1 page , I get the correct page, nut the index is always 499
Is it a bug or I did something wrong?
Thanks,
RIc