Title: subgrid with filter Post by: netterbizz on March 16, 2017, 06:34:21 AM please help me, how to add filter date to subgrid with the following code :
$('#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:'lap-pegawai-data-det.php?filternip='+row.nip, fitColumns:false, singleSelect:true, rownumbers:true, loadMsg:'Tunggu Sebentar', height:'auto', columns:[[ {field:'tanggal',title:'Tanggal',width:120,align:'center'}, {field:'keterangan',title:'Keterangan Absensi',width:400,align:'left'} ]], onResize:function(){ $('#dg').datagrid('fixDetailRowHeight',index); }, onLoadSuccess:function(){ setTimeout(function(){ $('#dg').datagrid('fixDetailRowHeight',index); },0); } }); $('#dg').datagrid('fixDetailRowHeight',index); } }); best regards and thank you Title: Re: subgrid with filter Post by: jarry on March 16, 2017, 06:45:43 AM Please describe your question in more detail.
Title: Re: subgrid with filter Post by: netterbizz on March 16, 2017, 07:02:42 AM please help me, how to add filter date to subgrid with the following code : $('#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:'lap-pegawai-data-det.php?filternip='+row.nip, fitColumns:false, singleSelect:true, rownumbers:true, loadMsg:'Tunggu Sebentar', height:'auto', columns:[[ {field:'tanggal',title:'Tanggal',width:120,align:'center'}, {field:'keterangan',title:'Keterangan Absensi',width:400,align:'left'} ]], onResize:function(){ $('#dg').datagrid('fixDetailRowHeight',index); }, onLoadSuccess:function(){ setTimeout(function(){ $('#dg').datagrid('fixDetailRowHeight',index); },0); } }); $('#dg').datagrid('fixDetailRowHeight',index); } }); best regards and thank you in this code will show all data (all date) in subgrid with same nip at parentgrid url:'lap-pegawai-data-det.php?filternip='+row.nip, i want add date filter or other criteria to limit data in datebase that will shown in subgrid |