I use subgrid in subgrid ,,, the code is:
$('#dd_list').datagrid({
fit:true,
url:http://...,
iconCls:"icon-save",
rownumbers:true,
showFooter:true,
columns:[[
...
]],
pageSize:30,
pagination:true,
view: detailview,
detailFormatter:function(index,row){
return '<div style="padding:2px"><table id="ddv-' + index + '"></table></div>';
},
onExpandRow: function(index,row){
$('#ddv-'+index).datagrid({
url:...,
fitColumns:true,
autoRowHeight:true,
rownumbers:true,
loadMsg:'',
height:'auto',
columns:[[...]],
onResize:function(){
$('#dd_list').datagrid('fixDetailRowHeight',index);
},
onLoadSuccess:function(){
setTimeout(function(){
$('#dd_list').datagrid('fixDetailRowHeight',index);
},100);
},
view: detailview,
detailFormatter:function(index1,row1){
return '<div style="padding:2px"><table id="ddv1-'+row1.dzddbh.trim()+ index1 + '"></table></div>';
},
onExpandRow: function(index1,row1){
$('#ddv1-'+row1.dzddbh.trim()+index1).datagrid({
url:...,
fitColumns:true,
autoRowHeight:true,
rownumbers:true,
loadMsg:'',
height:'auto',
columns:[[
...],[...]
],
onResize:function(){
$('#ddv-' + index ).datagrid('fixDetailRowHeight',index1);
$('#dd_list').datagrid('fixDetailRowHeight',index);
},
onLoadSuccess:function(){
setTimeout(function(){
$('#ddv-' + index ).datagrid('fixDetailRowHeight',index1);
$('#dd_list').datagrid('fixDetailRowHeight',index);
},0);
}
});
$('#ddv-' + index ).datagrid('fixDetailRowHeight',index1);
$('#dd_list').datagrid('fixDetailRowHeight',index);
}
});
$('#dd_list').datagrid('fixDetailRowHeight',index);
}
});
It can work,but there is a problem.
When I show the secord subgrid , the first subgrid is scrolled; and the scroll bar is very short , so that can not see the data directly.
Is there a way that can see the whole data clearly that not scrolled in first subgrid,of course , it can scolled in #dd_list.
EasyUI