DHTMLX Docs & Samples Explorer

Grid with subgrid

You can set subrow and subgrid ("sub_row_grid" excell) for the grid cell.
Subrow's data can be set in xml ("sub_row" excell) or loaded from other file by ajax ("sub_row_ajax" excell).
Just try to open cell

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>    
<script  src="../../codebase/excells/dhtmlxgrid_excell_sub_row.js"></script>    
 
 
 
<div id="gridbox" style="width:600px;height:500px;background-color:white;"></div>
<script>
mygrid = new dhtmlXGridObject('gridbox');
mygrid.setImagePath("../../codebase/imgs/");
mygrid.setHeader("&nbsp;,Book Title,Author,Price,In Store,Shipping,Bestseller,Date of Publication");
mygrid.setInitWidths("30,150,100,80,80,80,80,200");
mygrid.setColAlign("right,left,left,right,center,left,center,center");
mygrid.setColTypes("sub_row,edtxt,ed,price,ch,co,ra,ro");
mygrid.init();
mygrid.enableAutoHeight(true);
mygrid.setSkin("dhx_skyblue");
mygrid.loadXML("../common/sgrid.xml", function() {
    mygrid.cells("2", 0).open();
});
</script>