DHTMLX Docs & Samples Explorer

### Configuration from XML

Configuration of grid can be loaded from XML file. You need only 2-3 script commands to get the grid up and running.

Serialize grid
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:600px; height:270px; background-color:white;"></div>
    <a href='#alfa' onClick="if(mygrid.setSerializationLevel){ser();} else {alert('Available in Pro Edition only')}">Serialize grid</a>
    <script>mygrid = new dhtmlXGridObject('gridbox');
    mygrid.setImagePath("../../codebase/imgs/");
    mygrid.setSkin("dhx_skyblue");
    mygrid.loadXML("../common/gridH.xml");
    function ser() {
        mygrid.setSerializationLevel(false, false, true);
        document.getElementById("alfa1").innerHTML = mygrid.serialize().replace(/\</g, "&lt;").replace(/\>/g, "&gt;").replace(/\&lt;row/g, "<br/>&lt;row");
    }</script>
    <a name="alfa">
    <div id="alfa1"></div>
    </a>