Tab Order and Readonly Cells
</> Source
<!DOCTYPE html>
<!--pro-->
<html>
<head>
<title>Tab Order and Readonly Cells</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("Column A, Column B, column c");
myGrid.setInitWidths("100,150,*");
myGrid.setColAlign("right,left,left,left");
myGrid.setColTypes("ro,ed,ed");
myGrid.setColSorting("int,str,str");
myGrid.enableMultiselect(true);
myGrid.enableEditTabOnly(1);
myGrid.setExternalTabOrder("elem1","elem2");
myGrid.init();
myGrid.load("../common/grid.xml");
}
</script>
</head>
<body onload="doOnLoad()">
<h1>Tab Order and Readonly Cells</h1>
<p>enableEditTabOnly method allows to navigate between editable cells only.<br/>
Using setExternalTabOrder method you can set external elements which get focus when tab|tab+shift is pressed in the last|first cell.</p>
<table>
<tr>
<td>
<input type="text" id="elem1" value="start" size="20">
</td>
</tr>
<tr>
<td>
<div id="gridbox" style="width:400px; height:275px; background-color:white;"></div>
</td>
</tr>
<tr>
<td>
<input type="text" id="elem2" value="end" size="20">
</td>
</tr>
<tr>
<td>
<a href="javascript:void(0)" onClick="myGrid.enableEditTabOnly(true);">enable</a> | <a href="javascript:void(0)" onClick="myGrid.enableEditTabOnly(false);">disable</a> EditTabOnly
</td>
</tr>
</table>
</body>
</html>
Documentation
Check documentation to learn how to use the components and easily implement them in your applications.