';
},onExpandRow: function(index2,row2){//嵌套第二层,严重注意喔
var ddv2 = $(this).datagrid('getRowDetail',index2).find('#ddv2-'+index2);//严重注意喔
ddv2.datagrid({
view: detailview,singleSelect:false,rownumbers:true,// height:'auto',columns:[[
{field:'inv',title:'月份',width:100,align:'right'},align:'right'}
]],detailFormatter:function(index2,row3){//严重注意喔
return '
';
},onExpandRow: function(index3,row3){//嵌套第三层,严重注意喔
var ddv3 = $(this).datagrid('getRowDetail',index3).find('#ddv3-'+index3);//严重注意喔
ddv3.datagrid({//严重注意喔 这里没有detailview了哈
url:'json/datagrid_data3.json',fitColumns:false,//
singleSelect:false,// height:'auto',columns:[[
{field:'aaa',title:'项目
名称',{field:'bbb',title:'合同编号',{field:'ccc',title:'合同
名称',{field:'ddd',title:'款数',{field:'eee',title:'技术负责人',width:50,{field:'fff',title:'条件具备日期',{field:'ggg',title:'销售',{field:'hhh',title:'收款计划日期',{field:'iii',title:'计划收款比例',{field:'jjj',title:'实际收款比例',{field:'kkk',title:'差距',width:80,{field:'lll',title:'销售说明',
{field:'mmm',title:'收款金额',{field:'nnn',title:'详情',align:'right'}
]],detailFormatter:function(index3,row){//严重注意喔
return '';//严重注意喔
},onResize:function(){//严重注意喔
ddv2.datagrid('fixDetailRowHeight',index3);
ddv.datagrid('fixDetailRowHeight',index2);
$('#dg').datagrid('fixDetailRowHeight',index);
},onLoadSuccess:function(){
setTimeout(function(){//严重注意喔
ddv2.datagrid('fixDetailRowHeight',index3);
ddv2.datagrid('fixRowHeight',index2);
ddv.datagrid('fixRowHeight',index2);
$('#dg').datagrid('fixDetailRowHeight',index);
$('#dg').datagrid('fixRowHeight',0);
}
});//严重注意喔
ddv2.datagrid('fixDetailRowHeight',index);
ddv.datagrid('fixDetailRowHeight',index);
$('#dg').datagrid('fixDetailRowHeight',index);
},onCollapseRow: function(index3,row3){//严重注意喔
var ddv3 = $(this).datagrid('getRowDetail',index3).find('#ddv3-'+index3);
ddv3.datagrid({
onResize:function(){
ddv2.datagrid('fixDetailRowHeight',index3);
ddv.datagrid('fixDetailRowHeight',index);
}
});//严重注意喔
ddv2.datagrid('fixDetailRowHeight',onResize:function(){//严重注意喔
ddv.datagrid('fixDetailRowHeight',index2);
$('#dg').datagrid('fixDetailRowHeight',onLoadSuccess:function(){//严重注意喔
setTimeout(function(){
ddv.datagrid('fixDetailRowHeight',index2);
ddv.datagrid('fixRowHeight',index);
$('#dg').datagrid('fixRowHeight',0);
}
});//严重注意喔
ddv.datagrid('fixDetailRowHeight',index2);
$('#dg').datagrid('fixDetailRowHeight',index);
},onCollapseRow: function(index2,row2){//严重注意喔
var ddv2 = $(this).datagrid('getRowDetail',index2).find('#ddv2-'+index2);
ddv2.datagrid({
onResize:function(){
ddv.datagrid('fixDetailRowHeight',index);
}
});//严重注意喔
ddv.datagrid('fixDetailRowHeight',onResize:function(){
$('#dg').datagrid('fixDetailRowHeight',onLoadSuccess:function(){
setTimeout(function(){
$('#dg').datagrid('fixDetailRowHeight',index);
$('#dg').datagrid('fixRowHeight',0);
}
});
$('#dg').datagrid('fixDetailRowHeight',index);
}
});
});
以上所述是小编给大家介绍的EasyUI折叠表格层次显示detailview详解及实例。编程之家 jb51.cc 收集整理的教程希望能对你有所帮助,如果觉得编程之家不错,可分享给好友!感谢支持。