Grid linked to grid
You can use one grid as editor for another grid. Just try to edit column with authors.
</> Source
<!DOCTYPE html>
<!--pro-->
<html>
<head>
<title>Grid linked to grid</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() {
subGrid = new dhtmlXGridObject('gridbox_sub');
subGrid.setImagePath("../../../codebase/imgs/");
subGrid.setHeader("Name,UID,Total count");
subGrid.setInitWidths("100,120,80");
subGrid.enableAutoHeight(true);
subGrid.setColTypes("ro,ro,ro");
subGrid.init();
subGrid.load("../common/authors.xml",function(){
myGrid = new dhtmlXGridObject('gridbox');
myGrid.setImagePath("../../../codebase/imgs/");
myGrid.setHeader("Sales, Book Title, Author,Price,In Store,Shipping,Bestseller,Date of Publication");
myGrid.setInitWidths("70,150,100,80,80,80,80,100");
myGrid.setColAlign("right,left,left,right,center,left,center,center");
myGrid.setColTypes("dyn,ed,grid,price,ch,co,ra,ro");
myGrid.setSubGrid(subGrid,2,0);
myGrid.enableAutoWidth(true);
myGrid.enableAutoHeight(true);
myGrid.init();
myGrid.load("../common/grid_authors.xml");
});
}
</script>
</head>
<body onload="doOnLoad()">
<h1>Grid linked to grid</h1>
<p>You can use one grid as editor for another grid. Just try to edit column with authors.</p>
<div id="gridbox" style="width:750px; height:350px; background-color:white;"></div>
<div id="gridbox_sub" style="width:300px; height:150px; background-color:white;"></div>
</body>
</html>
Documentation
Check documentation to learn how to use the components and easily implement them in your applications.