Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Raghu on Oct 20, 2008 22:49
open dhtmlx forum
Hi,How to move to the first and last page in dynamic loading ...

Hi,
How to move to the first and last page in dynamic loading
Answer posted by Support on Oct 21, 2008 02:03
You can use changePage(pageNumber) method:

- the first page:

     grid.changePage(1);

- the last page:

    var pagesCount = Math.ceil(mygrid.getRowsNum()/page_size);
   
    grid.changePage(pagesCount);

page_size is value which you set in the enablePaging method (the second parameter).