Categories | Question details Back To List | ||
I have used the api function and works as expected: mygrid.setColumnHidden(idx,true);I have paginal ... I have used the api function and works as expected: mygrid.setColumnHidden(idx,true); I have paginal output that interrogates the hidden column on every page. I have therefore implemented the following callback on a page change: mygrid.setOnPageChanged(function(pageNo){ mygrid.forEachRow(function(id){ cellValue = mygrid.cells(id,10).getValue(); if (cellValue == "someValue"){ mygrid.setRowColor(id,"#FFAFBA"); } }); }); The forEachRow function always starts at the first row of the first page. In other words when on page 1 it loops through the rows on page 1. When on page 2 it loops through the rows on page 1 and 2. When on page 3 it loops through pages 1,2 and 3 etc. This seems inefficient for my purposes. Is there a way to interrogate only the rows of the page that the client is on? Somehow passing in a start and end row identifier? Thanks George Answer posted by Support on Apr 02, 2008 00:20 Classic iteratorfor (var i=0; i<grid.getRowsCount(); i++){This way of iteration has the following characteristics:
Built-in iteratorgrid.forEachRow(function(id){This way of iteration has the following characteristics:
So you can use for (var i=0; i<grid.rowsCol.length; i++){ do_something_with_row(index); } |