-
-
-
$(function(){
$('#dg').datagrid({
view: detailview,
detailFormatter:function(index,row){
return '<div style="padding:2px"><table class="table"></table></div>';
},
onExpandRow: function(index,row){
var $table = $(this).datagrid('getRowDetail',index).find('table.table');
$table.datagrid({
url:'dg.do?id='+row.id,
fitColumns:true,
singleSelect:true,
rownumbers:false,
pageSize:10,
pageList:[ 5, 10, 20],
pagination:true,
loadMsg:'加载中。。。',
height:'auto',
columns:[[
{field:'id',title:'id',width:50,align:'center'},
{field:'repaymentNo',title:'名称',width:100,align:'center'},
]],
onResize:function(){
$('#dg').datagrid('fixDetailRowHeight',index);
},
onLoadSuccess:function(){
setTimeout(function(){
$('#dg').datagrid('fixDetailRowHeight',index);
},0);
}
});
$('#dg').datagrid('fixDetailRowHeight',index);
}
});
});
-
-
转载于:https://www.cnblogs.com/lxjy201832/p/9268079.html