DHTMLX Docs & Samples Explorer

Locked row(s)

You are allowed to prohibit editing rows in user interface. Instead of this you should specify new values for rows using some methods in API (setValue method, for instance).

As you can see in the sample below you have the possibility to lock any row before loading by using lockRow method. Here rows 1-3 are locked from XML. This funclionality will be enabled once grid is fully loaded.

Lock row 1 Unlock row 1
Lock row 2 Unlock row 2
Lock row 3 Unlock row 3

 

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 width="600">
    <tr>
        <td>
            <div id="gridbox" style="width:100%;height:270px;background-color:white;"></div>
        </td>
    </tr>
    <tr>
        <td>&nbsp;</td>
    </tr>
</table>
<br>
    
<script>
mygrid = new dhtmlXGridObject('gridbox');
mygrid.setImagePath("../../codebase/imgs/");
mygrid.setHeader("Sales,Book Title,Author,Price,In Store,Shipping");
mygrid.setInitWidths("50,200,200,70,70,100");
mygrid.setColAlign("right,left,left,right,center,center");
mygrid.setColTypes("dyn,ed,ed,ed,ch,ed");
mygrid.setColSorting("int,str,str,int,str,date");
mygrid.init();
mygrid.setSkin("dhx_skyblue");
mygrid.loadXML("../common/grid_lock.xml");
</script>