<div id="Grid"></div>
$(function () {
$("#Grid").ejGrid({
dataSource: data,
allowSorting: true,
dataBound: function(args){
this.expandAll();
},
. ..
childGrid: {
dataSource: window.gridData,
queryString: "EmployeeID",
allowPaging: true,
dataBound: function(args){
this.expandAll();
},
. ..
childGrid: {
dataSource: window.ordersView,
queryString: "CustomerID",
. . .
},
},
});
}); |
<script type="text/javascript">
$("#refresh").click(function () {
$("#Grid").ejGrid("expandAll")
var grid = $(".e-grid");
for(i=1;i<grid.length;i++){
var id = grid.eq(i).attr("id");
$("#" + id).ejGrid("expandAll")
}
});
</script>
|