JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="http://www.jeasyui.com/easyui/themes/default/easyui.css">
<link rel="stylesheet" href="http://www.jeasyui.com/easyui/themes/icon.css">
<script src="http://code.jquery.com/jquery-1.4.4.min.js"></script>
<script src="http://www.jeasyui.com/easyui/jquery.easyui.min.js"></script>
<script src="http://www.jeasyui.com/easyui/datagrid-detailview.js"></script>
<h2>Expand row in DataGrid to show subgrid</h2>
<div class="demo-info" style="margin-bottom:10px">
<div class="demo-tip icon-tip"> </div>
<div>Click the expand button to expand row and view subgrid.</div>
</div>
<table id="dg" style="width:650px;height:250px"
title="DataGrid - SubGrid" singleSelect="true" fitColumns="true">
<thead>
<tr>
<th field="itemid" width="80">Item ID</th>
<th field="productid" width="100">Product ID</th>
<th field="listprice" align="right" width="80">List Price</th>
<th field="unitcost" align="right" width="80">Unit Cost</th>
<th field="attr1" width="220">Attribute</th>
<th field="status" width="60" align="center">Status</th>
</tr>
</thead>
</table>
JavaScript
$(function(){
var show_form = '<form method="post"><style type="text/css" >.dv-table td{border-style: none;}</style>';
show_form+='<table class="dv-table" style="width:100%;border:1px solid #ccc;padding:5px;margin-top:5px;"><tr>';
show_form+='<td>First Name</td><td><input name="firstname" class="easyui-validatebox" required="true"></input></td>';
show_form+='<td>Last Name</td>';
show_form+='<td><input name="lastname" class="easyui-validatebox" required="true"></input></td>';
show_form+='</tr><tr>';
show_form+='<td>Phone</td>';
show_form+='<td><input name="phone"></input></td>';
show_form+='<td>Email</td>';
show_form+='<td><input name="email" class="easyui-validatebox" validType="email"></input></td>';
show_form+='</tr></table>';
show_form+='<div style="padding:5px 0;text-align:right;padding-right:30px">';
show_form+='<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-save" plain="true" onclick="saveItem(1)">Save</a>';
show_form+='<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel" plain="true" onclick="cancelItem(1)">Cancel</a>';
show_form+='</div></form>';
$('#dg').datagrid({
data:[{"itemid":"EST-12","productid":"RP-SN-01","listprice":"18.50","unitcost":"12.00","status":"P","attr1":"Rattleless"},{"itemid":"EST-13","productid":"RP-LI-02","listprice":"18.50","unitcost":"12.00","status":"P","attr1":"Green Adult"},{"itemid":"EST-16","productid":"FL-DLH-02","listprice":"93.50","unitcost":"12.00","status":"P","attr1":"Adult Female"},{"itemid":"EST-18","productid":"AV-CB-01","listprice":"193.50","unitcost":"92.00","status":"P","attr1":"Adult Male"},{"itemid":"EST-19","productid":"AV-SB-02","listprice":"15.50","unitcost":"2.00","status":"P","attr1":"Adult Male"},{"itemid":"EST-21","productid":"FI-FW-02","listprice":"5.29","unitcost":"1.00","status":"P","attr1":"Adult...