Grid linked to menu
Excell "context" allows to set menu as editor for grid's cell. Just try to edit column with authors.
</> Source
<!DOCTYPE html>
<!--pro-->
<html>
<head>
<title>Grid linked to menu</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, myMenu;
function doOnLoad() {
myMenu = new dhtmlXMenuObject();
myMenu.setIconsPath("../common/images/");
myMenu.renderAsContextMenu();
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,context,price,ch,co,ra,ro");
myGrid.setSubContext(myMenu,2,0);
myGrid.enableAutoWidth(true);
myGrid.enableAutoHeight(true);
myGrid.init();
myMenu.loadStruct("../common/_context.xml",function(){
myGrid.load("../common/grid.xml");
});
}
</script>
</head>
<body onload="doOnLoad();">
<h1>Grid linked to menu</h1>
<p>Excell "context" allows to set menu as editor for grid's cell. Just try to edit column with authors.</p>
<table width="764px">
<tr>
<td><div id="gridbox" style="width:100%;height:350px;background-color:white;"></div></td>
</tr>
<tr>
<td><div id="context"></div></td>
</tr>
</table>
</body>
</html>
Documentation
Check documentation to learn how to use the components and easily implement them in your applications.