Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Vanamali on Jan 20, 2010 23:19
open dhtmlx forum
Grid Pagination with Toolbar - How to set the perPageSelect

Hi,
    I want to have per pages select as 50 per page, 100 per page, 150 per page and so on... customizable, as I need. I am using toolbar skin. How do I customize the per page select? I looked into the code in dhtmlxgrid_pgn.js. At the end of it, it was hardcoded as k=5;k<35;k+=5 and so we get the perpagesselect always as 5,10,...,30.
   I tried to change the code to read as k=this.pagesInGroup;k<=this.rowsBuffer.length+this.pagesInGroup;k+=this.pagesInGroup
But unfortunately, I am not getting the expected result.
For the sample, I have created a grid with 5 rows and 2 rows in each page. So I was expecting 2,4,6 per page in the selection. But this.rowsBuffer.Length or this.getRowsNum() both return 2 instead of total rows as 5. How do I get the total rows?

Please help me to resolve this.
Answer posted by Alex (support) on Jan 21, 2010 03:47

Hello,

we have modified the the WT template, so that it allows to changethe pages options. Please contact us at support@dhtmlx.com if you're interested in this solution.