DHTMLX Docs & Samples Explorer

FORM integration

Edit something in grid and press submit (requires PHP)


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/ext/dhtmlxgrid_form.js"></script>
<script  src="../../codebase/dhtmlxgridcell.js"></script>
 
 
<form action="php/pro_form.php" method="post" target="result">
    <table width="600">
        <tr>
            <td>
                <div id="gridbox" style="width:100%; height:270px; background-color:white;"></div>
            </td>
        </tr>
    </table>
    <input type="submit">
</form>
<iframe id="result" name="result" width="600px" height="200px"></iframe>
<br>
<script>
mygrid = new dhtmlXGridObject('gridbox');
mygrid.setImagePath("../../codebase/imgs/");
mygrid.setHeader("Sales, Book Title, Author");
mygrid.setInitWidths("150,150,*");
mygrid.setColAlign("left,left,left");
mygrid.setColTypes("dyn,txt,ed");
mygrid.setColSorting("str,str,str");
mygrid.init();
mygrid.setSkin("dhx_skyblue");
mygrid.loadXML("../common/grid.xml");
</script>