Sample: dhtmlxGrid Paginal Output dhtmlxGrid main page
X

In sample below number of rows per page set to 10 and number of pages per group set to 3


 
<div id="gridbox" width="100%" height="250px" style="background-color:white;overflow:hidden"></div>
<script>
 
        mygrid = new dhtmlXGridObject('gridbox');
        ...
        //should be called before init()
        mygrid.enablePaging(true,10,3,"pagingArea",true,"recinfoArea");
        ...
        mygrid.init();
        mygrid.loadXML("dynscroll.xml");//this sample uses static loading
</script>
Parameters passed to enablePaging method:
  • true - means enable paginal output
  • 10 - number of rows per page
  • 3 - number of pages in group. You can set any number, but it is recommended to use smaller. There is also some auto-limits when using autoloading (grid will correct value automatically).
  • "pagingArea" - ID of element where to append paging pannel to (where to show pages navigation)
  • true - means that Records Info will be shown ("Results 11-40 from known 100")
  • "recinfoArea" - ID of element to append Records Info to (by default it will be append to paging panel)
  • THIS PAGE CONTAINS SAMPLE FUNCTIONALITY OF PROFESSIONAL EDITION FOR DEMONSTRATION PURPOSE ONLY.
    UNAUTHORIZED USE IS PROHIBITED. PLEASE CONTACT SALES@DHTMLX.COM TO OBTAIN A LEGAL COPY OF PROFESSIONAL EDITION.