I have created a grid, with subgrid as follow (it is more or less the same as the example code)
The problem is: How can I add a toolbar to this sub-grid? Thx
$(function(){
$('#dg').datagrid({
view: detailview,
detailFormatter:function(index,row){
return '<div style="padding:2px"><table class="ddv"></table></div>';
},
onExpandRow: function(index,row){
var ddv = $(this).datagrid('getRowDetail',index).find('table.ddv');
ddv.datagrid({
url: "gettxprog.php?patno=901001&txnum=" + row.txnum,
//url:'datagrid22_getdetail.php?itemid='+row.itemid,
fitColumns:true,
singleSelect:true,
rownumbers:true,
loadMsg:'',
height:'auto',
columns:[[
{field:"txdate", title:'Date', width:30},
{field:"descp", title:'Detail', width:80},
{field:"stage", title:'Stage', width:20},
{field:"payway", title:'Pay Method', width:20},
{field:"paid", title:'Paid', width:20},
{field:"dr", title:'Dr', width:20}
]],
onResize:function(){
$('#dg').datagrid('fixDetailRowHeight',index);
},
onLoadSuccess:function(){
setTimeout(function(){
$('#dg').datagrid('fixDetailRowHeight',index);
},0);
}
});
$('#dg').datagrid('fixDetailRowHeight',index);
}
});