last filters data are shown

This my scenario:


use persistence
- l load page
- 2 filter data with enter
- 3 clear filter data and enter
- 4 reload page

now, data are not filtered agrees with filter toolbar but grid shows filter indication with last filter data (on bottom of the grid)
how I can fix up this?









5 Replies 1 reply marked as answer

FS Farveen Sulthana Thameeztheen Basha Syncfusion Team February 17, 2021 05:41 AM UTC

Hi Alessandro, 

Thanks for contacting Syncfusion Support. 

Before proceeding with your query we would like to confirm whether are you using Essential JS1/ Essential JS 2 and share Complete Grid code details in order to provide you the solution as early as possible.  

Regards, 
Farveen sulthana T 



AD Alessandro Degola February 18, 2021 05:09 AM UTC

please look at attachment
Attachment: sync_68542f5e.rar


FS Farveen Sulthana Thameeztheen Basha Syncfusion Team February 19, 2021 02:50 PM UTC

Hi Alessandro, 

Thanks for your details. 

We are able to replicate the problem only at Scenario(Load Page-> Perform Filtering  -> Reloads Page -> Clear Filter -> Reloads Page). In that Scenario, Filtering is not enabled but Filterbarmessage has been shown on reloading the page. To overcome this problem, (Ignore filterbar message stored in LocalStorage) we suggest you to use IgnoreOnPersist method of the Grid on Load event to exclude the property from being persist based on condition. 

Refer to the code below:- 
@(Html.EJ().Grid<object>("Grid") 
         .Datasource(ds => ds.URL("/Grid/UrlDataSource") 
           .Adaptor(AdaptorType.UrlAdaptor)) 
         .AllowSorting(false) 
          .AllowResizeToFit() 
          .EnablePersistence(true) 
         .AllowTextWrap() 
         .AllowResizing() 
         .ClientSideEvents(eve =>{ eve.Load("load"); }) 
       .Columns(col => 
       { 
           col.Field("OrderID").HeaderText("Order ID").IsPrimaryKey(true).TextAlign(TextAlign.Right).Width(75).Add(); 
 
                   .     .   . 
       }) 
) 
 
<script> 
    function load(args) { 
        setTimeout(function () { 
            var obj = $("#Grid").ejGrid("instance");// use the grid id to take the grid instance. 
            if (!obj.model.filterSettings.filteredColumns.length) { 
                var ignore = ["pageSettings.externalMessage"]; 
                obj.ignoreOnPersist(ignore); 
            } 
        }, 20);  
    } 
     
</script> 


Refer to the documentation  Link:- 

Please get back to us if you need any further assistance on it. 

Regards, 
Farveen sulthana  


Marked as answer

AD Alessandro Degola March 4, 2021 10:16 AM UTC

It seems work well

alessandro


FS Farveen Sulthana Thameeztheen Basha Syncfusion Team March 5, 2021 04:43 AM UTC

Hi Alessandro,  

Thanks for your update. Please get back to us if you need any further assistance on it. We are happy to assist you. 

Regards, 
Farveen sulthana T 


Loader.
Up arrow icon