Title: How to empty / clear all rows in easyUI datagrid? I mean a real 'clearing' Post by: aswzen on August 29, 2014, 04:05:46 AM How to remove all data in a datagrid?
i know before another way to clear a datagrid is using Code: $('#cc').datagrid('loadData', []); Code: $('#cc').datagrid('loadData', {"total":0,"rows":[]}); or Code: var rows = $('#cc').datagrid('getSelections'); // get all selected rows ....why don't we just call Code: $('#cc').datagrid('clear') and somehow ive just found a bug... if you call this script Code: $('#cc').datagrid('loadData', []); just look at pic below, the datagrid load data remotely then localy after i fired the $('#cc').datagrid('loadData', []) (http://i.imgur.com/fbVOnqa.jpg) i need explanation.. thanks in advance. Title: Re: How to clear all rows in easyUI datagrid? I mean a real 'clearing' Post by: stworthy on August 29, 2014, 06:09:52 AM Calling the code $('#cc').datagrid('loadData', []); just clear the datagrid data. This does not make request to the remote server. If your issue continues, please try to download the patch from http://www.jeasyui.com/download/downloads/jquery-easyui-1.4-patch.zip.
Title: Re: How to clear all rows in easyUI datagrid? I mean a real 'clearing' Post by: aswzen on September 01, 2014, 12:17:10 AM i'am using jeasyui 1.4 + your patch...and the problem still unsolved..the datagrid populates again from server..i just want to clear it.,,
here my program listing... Code: <a href="#" onClick="emptyMe();">Clear</a> Code: <script> here the pic that shows the $('#table_program').datagrid('loadData', []); fires the datagrid to reload data from server(remote).. (http://i.imgur.com/XS2c9at.jpg) thanks |