Sample: dhtmlxGrid Paginal Output:dynamic loading dhtmlxGrid main page
X

dhtmlxGrid supports paginal output. You can use it togather with dynamical loading or separately.
In sample below number of rows per page set to 30 and number of pages per group set to auto (null) - based on rows in first portion loaded from server

Autoloading delivers 300 more records each time previous 300 was consumed. Number of total records is 2000.


 
<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,30,null,"pagingArea",true,"recinfoArea");
        ...
        mygrid.init();
        mygrid.loadXML("dynload_slow.php");
</script>
Parameters passed to enablePaging method:
  • true - means enable paginal output
  • 30 - number of rows per page
  • null - grid will decide about the number of pages in group automatically. You can set any number, but it is recommended to use smaller figures. 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.