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
<!DOCTYPE html>
<!--pro-->
<html>
<head>
	<title>Locked row(s)</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
	<link rel="stylesheet" type="text/css" href="../../../codebase/fonts/font_roboto/roboto.css"/>
	<link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlx.css"/>
	<script src="../../../codebase/dhtmlx.js"></script>
	<script>
		var myGrid;
		function doOnLoad(){
			myGrid = new dhtmlXGridObject('gridbox');
			myGrid.setImagePath("../../../codebase/imgs/");
			myGrid.setHeader("Sales,Book Title,Author,Price,In Store,Shipping");
			myGrid.setInitWidths("80,150,150,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.enableAutoWidth(true);
			myGrid.enableAutoHeight(true);
			myGrid.init();
			myGrid.load("../common/grid_lock.xml");
		}
	</script>
</head>
<body onload="doOnLoad()">
	<h1>Locked row(s)</h1>
	<p>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).
	<p>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.
        <table>
		<tr>
		<td><a href='#' onclick='myGrid.lockRow(1,true)'>Lock row 1</a></td>
		<td><a href='#' onclick='myGrid.lockRow(1,false)'>Unlock row 1</a></td>
		</tr>
		<tr>
		<td><a href='#' onclick='myGrid.lockRow(2,true)'>Lock row 2</a></td>
		<td><a href='#' onclick='myGrid.lockRow(2,false)'>Unlock row 2</a></td>
		</tr>
		<tr>
		<td><a href='#' onclick='myGrid.lockRow(3,true)'>Lock row 3</a></td>
		<td><a href='#' onclick='myGrid.lockRow(3,false)'>Unlock row 3</a></td>
		</tr>
        </table>
	</p>
	<table width="600">
		<tr>
			<td>
				<div id="gridbox" style="width:100%;height:450px;background-color:white;"></div>
			</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
		</tr>
	</table>
</body>
</html>

Documentation

Check documentation to learn how to use the components and easily implement them in your applications.