DHTMLX Docs & Samples Explorer

Paginal Output with Toolbar

Source
<link rel="STYLESHEET" type="text/css" href="../../codebase/dhtmlxgrid.css">
<link rel="STYLESHEET" type="text/css" href="../../codebase/skins/dhtmlxgrid_dhx_blue.css">
<link rel="STYLESHEET" type="text/css" href="../../../dhtmlxToolbar/codebase/skins/dhtmlxtoolbar_dhx_skyblue.css">
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxgrid_dhx_skyblue.css">
<script  src="../../codebase/dhtmlxcommon.js"></script>
<script  src="../../codebase/dhtmlxgrid.js"></script>    
<script  src="../../codebase/ext/dhtmlxgrid_pgn.js"></script>    
<script  src="../../codebase/dhtmlxgridcell.js"></script>    
<script  src="../../../dhtmlxToolbar/codebase/dhtmlxtoolbar.js"></script>
<style>
    .toolbarTable{
        background-color:#EDEDED;
    }
</style>
 
<script>
var mygrid;
function doOnLoad() {
    mygrid = new dhtmlXGridObject('gridbox');
    mygrid.selMultiRows = true;
    mygrid.setImagePath("../../codebase/imgs/");
    mygrid.setHeader("Sales,Book Title,Author,Price,In Store,Shipping,Bestseller,Date of Publication");
    mygrid.setInitWidths("50,130,120,80,80,80,80,200");
    mygrid.setColAlign("right,left,left,right,center,left,center,center");
    mygrid.setColTypes("dyn,ed,ed,price,ch,coro,ra,ro");
    mygrid.setColSorting("int,str,str,int,str,str,str,date");
    //set values for select box in 5th column;
    var combobox = mygrid.getCombo(5);
    combobox.put("1", "1 Hour");
    combobox.put("12", "12 Hours");
    combobox.put("24", "24 Hours");
    combobox.put("48", "2 days");
    combobox.put("168", "1 week");
    combobox.put("pick", "pick up");
    combobox.put("na", "na");
    //start grid;
    mygrid.setSkin("dhx_skyblue");
    mygrid.enablePaging(true, 10, 3, "recinfoArea");
    mygrid.setPagingSkin("toolbar", "dhx_skyblue");
    mygrid.init();
    mygrid.loadXML("../common/grid.xml");
}
</script> <table width="600" cellpadding="0" cellspacing="0"> <tr> <td> <div id="gridbox" style="width:100%; height:250px; background-color:white;overflow:hidden"></div> </td> </tr> <tr> <td> <div id="recinfoArea"></div> </td> </tr> </table>