DHTMLX Docs & Samples Explorer

Multiple Grids per Page

You can place any number of grids on page with different configuring and styling.

Source
<link rel="STYLESHEET" type="text/css" href="../../codebase/dhtmlxgrid.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/dhtmlxgridcell.js"></script>    
 
 
 
<table>
    <tr>
        <td>
            <div id="gridbox" style="width: 300px; height: 270px; overflow:hidden"></div>
        </td>
        <td> 
            <div id="gridbox2" style="width: 500px; height: 270px; overflow:hidden"></div>
        </td>
    </tr>
</table>
 
<script>
mygrid = new dhtmlXGridObject('gridbox');
mygrid.setImagePath("../../codebase/imgs/");
mygrid.setHeader("Column A, Column B");
mygrid.setInitWidths("150,*");
mygrid.setColAlign("right,left");
mygrid.setColTypes("ro,ed");
mygrid.setColSorting("int,str");
mygrid.setSkin("dhx_skyblue");
mygrid.init();
mygrid.loadXML("../common/grid.xml");
mygrid2 = new dhtmlXGridObject('gridbox2');
mygrid2.setImagePath("../../codebase/imgs/");
mygrid2.setHeader("Column A, Column B, Column C");
mygrid2.setInitWidths("200,100,*");
mygrid2.setColAlign("right,left,left");
mygrid2.setColTypes("ro,ed,ed");
mygrid2.setColSorting("int,str,str");
mygrid2.setSkin("dhx_skyblue");
mygrid2.init();
mygrid2.loadXML("../common/grid.xml");
</script>