Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Sudarshan Bhattacharjee on Jun 16, 2009 01:53
open dhtmlx forum
How to display page numbers in more than one place for grid

Hi

I'm working on Grid with pagination.
I would like to know, how can we display the page number in more than one place, i.e I want to display the page numbers Above and below the grid on the right hand side.
When we do enablePaging() we specify a div id for only one location. I even tried to put the same div id in above and below the grid, but only one location is visible. So how to do it?

Thanks for your assistence.

Answer posted by dhxSupport on Jun 16, 2009 03:03
You can get page number using event "onPageChanged". This event occurs after the active page in the grid was changed. onPageChanged event passes the following parameters: 
ind - index of the current page;
fInd - index of the first row on page;
lInd - index of the last row on page.
  grid.attachEvent("onPageChanged", function(ind,fInd,lInd){});

Please see more information about customizing paging output here http://dhtmlx.com/docs/products/dhtmlxGrid/doc/articles/Custom_paging.html#grid_art_custpaging