DHTMLX Docs & Samples Explorer

Initialize object on page, through object based API

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>    
 
 
 
            <div id="gridbox" style="width:350px;height:250px;background-color:white;overflow:hidden"></div>
<script>
mygrid = new dhtmlXGridObject({
    parent: 'gridbox',
    image_path: "../../codebase/imgs/",
    skin: "dhx_skyblue",
    columns: [{
        label: "Column A",
        width: 100,
        type: "ro",
        sort: "int",
        align: "right";
    }, {
        label: "Column B",
        width: 250,
        type: "ed",
        sort: "str",
        align: "left";
    }],
    multiselect: true,
    xml: "../common/grid.xml";
});
</script>