We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Is it possible to persist filter, sorting and grouping selections on grid

Thread ID:

Created:

Updated:

Platform:

Replies:

132333 Aug 26,2017 03:54 PM Oct 16,2017 05:54 AM ASP.NET Core 5
loading
Tags: Grid
dsapo
Asked On August 27, 2017 07:42 PM

Hi Support:

We have a grid with the Excel like filtering enabled. Would be possible to persists the filter, sorting, paging and  grouping selection during whole user session.  

The idea is that the user will filter the Model column (for example show only  the Toyota Corolla) and then when he navigates to to another page and then comeback to the grid, the filter criteria is still selected with the Corolla value. 


Thanks in advanced

David

Saravanan Arunachalam [Syncfusion]
Replied On August 28, 2017 01:29 AM

Hi David, 
Thanks for contacting Syncfusion’s support. 
Yes, we can persist the user session by define enable-persistence property of Grid control as true and we have already discussed this query in the following documentation link. 
Regards, 
Saravanan A. 


dsapo
Replied On August 28, 2017 12:35 PM

Thanks Saravanan  for your help.


Saravanan Arunachalam [Syncfusion]
Replied On August 29, 2017 12:57 AM

Hi David,  
Thanks for your update.            
We are happy that the provided information helped you. 
Regards, 
Saravanan A. 


Klaus
Replied On October 14, 2017 05:33 PM

Hi,

i'm working on an grid with server side paging and enablePersitence. (I'm binding the Datasource with ".Datasource(ds.URL("/controller/datasource").Adaptor("UrlAdaptor")))

Everything works as expected, except the current page number is not stored/restored. 

What i'm trying to do: 

1) I have a grid which contains a list of items. 

2) when the user clicks on an item, the user will be directed to a details view of the item, where the user may modify the item etc.

3) when the user navigates back without providing the pagenumber, the filter/sorting is correctly restored, but not the current page. 

Question: Is it possible to restore the "current" page without providing the page=123 parameter in the redirect url?


(MVC 5 with Grid)

thanks in advance,

Klaus




Saravanan Arunachalam [Syncfusion]
Replied On October 16, 2017 05:54 AM

Hi Klaus, 
We are sorry that we are unable to reproduce your reported issue and we have created a sample that can be downloaded from the below link. 
In the above sample, we have performed on demand paging using urladaptor and it is persisted by defining the enable-persistence as true. Please refer to the below code example. 
<ej-grid id="MasterGrid" allow-paging="true" enable-persistence="true" allow-filtering="true" allow-sorting="true"> 
    <e-datamanager adaptor="UrlAdaptor" url="Home/DataSource"></e-datamanager> 
    . . . 
</ej-grid> 
 
[Controller] 
public ActionResult DataSource([FromBody]Syncfusion.JavaScript.DataManager dm) 
        { 
            IEnumerable Data = GetAllRecords(); 
            Syncfusion.JavaScript.DataSources.DataOperations operation = new Syncfusion.JavaScript.DataSources.DataOperations(); 
            if (dm.Sorted != null && dm.Sorted.Count > 0) //Sorting 
            { 
                Data = operation.PerformSorting(Data, dm.Sorted); 
            } 
            if (dm.Where != null && dm.Where.Count > 0) //Filtering 
            { 
                Data = operation.PerformWhereFilter(Data, dm.Where, dm.Where[0].Operator); 
            } 
            int count = Data.AsQueryable().Count(); 
            if (dm.Skip != 0) 
            { 
                Data = operation.PerformSkip(Data, dm.Skip); 
            } 
            if (dm.Take != 0) 
            { 
                Data = operation.PerformTake(Data, dm.Take); 
            } 
            return Json(new { result = Data, count = count }); 
        } 
 
 
If the issue is still exist, please provide the following details. 
1.       Replication procedure to reproduce your reported issue. 
2.       Share video clip to replicas the issue. 
3.       If possible, please reproduce the issue in above attached sample. 
Regards, 
Saravanan A. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;