Title: onLoadSuccess on 1st datagrid cannot firing when contain 2 datagrid
Post by: neos on March 10, 2015, 12:46:46 AM
I have 2 datagrid in 1 file. every datagrid have a onLoadSucces events. on 2nd datagrid, onLoadSuccess events works fine but on 1st datagrid cannot firring. but if i delete 2nd datagrid, onLoadSucces events in 1st datagrid works fine. table <div class="easyui-layout" data-options="fit:true"> <div data-options="region:'center',border:false"> <table id="grid-transaksi_bpb" data-options="pageSize:50, multiSort:true, remoteSort:true, rownumbers:true, singleSelect:true, fit:true, fitColumns:true, toolbar:toolbar_transaksi_bpb"> <thead> <tr> <th data-options="field:'ck',checkbox:true" ></th> <th data-options="field:'fbpb_id'" width="50" halign="center" align="center" sortable="true">ID</th> <th data-options="field:'fbpb_tanggal'" width="100" halign="center" align="center" sortable="true">Tanggal</th> <th data-options="field:'d.karyawan_nama'" width="150" halign="center" align="center" sortable="true">Nama Karyawan</th> <th data-options="field:'c.departemen_nama'" width="100" halign="center" align="center" sortable="true">Departemen</th> <th data-options="field:'b.departemen_nama'" width="100" halign="center" align="center" sortable="true">Bagian</th> <th data-options="field:'fbpb_timestamp'" width="150" halign="center" align="center" sortable="true">Tanggal Pembuatan</th> <th data-options="field:'fbpb_disetujui'" width="70" halign="center" align="center" sortable="true">Disetujui</th> <th data-options="field:'fbpb_diketahui'" width="70" halign="center" align="center" sortable="true">Diketahui</th> </tr> </thead> </table> </div> <div data-options="region:'south',split:true,border:true" style="height:200px"> <table id="grid-transaksi_bpb_detail" data-options="pageSize:50, multiSort:true, remoteSort:true, rownumbers:true, singleSelect:true, fit:true, fitColumns:true, toolbar:toolbar_transaksi_bpb_detail"> <thead> <tr> <th data-options="field:'ck',checkbox:true" ></th> <th data-options="field:'fbpb_detail_barang'" width="300" halign="center" align="center" sortable="true">Nama Barang</th> <th data-options="field:'fbpb_detail_qty'" width="70" halign="center" align="center" sortable="true">Jumlah</th> <th data-options="field:'fbpb_detail_digunakan'" width="100" halign="center" align="center" sortable="true">Tgl Digunakan</th> <th data-options="field:'fbpb_detail_stock'" width="50" halign="center" align="center" sortable="true">Stock</th> <th data-options="field:'fbpb_detail_pemakaian'" width="70" halign="center" align="center" sortable="true">Pemakaian</th> <th data-options="field:'fbpb_detail_ket'" width="300" halign="center" align="center" sortable="true">Keterangan</th> </tr> </thead> </table> </div> </div>
javascript $('#grid-transaksi_bpb').datagrid({view:scrollview,remoteFilter:true, url:'<?php echo site_url('transaksi/bpb/index'); ?>?grid=true'}) .datagrid({ onLoadSuccess: function(data){ alert(); }, onClickRow: function(index,row){ $('#bpb_edit').linkbutton('enable'); $('#bpb_delete').linkbutton('enable'); $('#bpb_detail_new').linkbutton('enable'); $('#bpb_detail_refresh').linkbutton('enable'); nilai = row.fbpb_id; $('#grid-transaksi_bpb_detail').datagrid('load','<?php echo site_url('transaksi/bpb/index_detail'); ?>?grid=true&nilai='+nilai); }, onDblClickRow: function(index,row){ transaksiBpbUpdate(); }, onSortColumn: function(sort,order){ headerRefresh(); } }).datagrid('enableFilter');
$('#grid-transaksi_bpb_detail').datagrid({view:scrollview,remoteFilter:true}) .datagrid({ onLoadSuccess: function(data){ $('#bpb_detail_edit').linkbutton('disable'); $('#bpb_detail_delete').linkbutton('disable'); }, onClickRow: function(index,row){ $('#bpb_detail_edit').linkbutton('enable'); $('#bpb_detail_delete').linkbutton('enable'); }, onDblClickRow: function(index,row){ transaksiBpbDetailUpdate(); } }).datagrid('enableFilter');
have any idea ? ???
Title: Re: onLoadSuccess on 1st datagrid cannot firing when contain 2 datagrid
Post by: neos on March 11, 2015, 03:04:43 AM
still try.. ???
Title: Re: onLoadSuccess on 1st datagrid cannot firing when contain 2 datagrid
Post by: neos on March 13, 2015, 08:41:03 AM
I found the problem.
I have 2 different tabs where each tab containing different DataGrid id. when I opened the first tab Events onLoadSucces running normally. but when I am opening any second tab, the Events onLoadSucces not running. It is sometimes the case. sometimes both normal events but occasionally one of the events do not run normally. I use firefox and chrome browser. how to keep both Events onLoadSuccess can run normally in firefox and chrome or there is a problem on my browser?
Title: Re: onLoadSuccess on 1st datagrid cannot firing when contain 2 datagrid
Post by: neos on March 26, 2015, 12:02:25 AM
have any idea ? ???
|