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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Sort/filter is not working if using UrlAdaptor

Thread ID:





131854 Jul 31,2017 01:00 PM UTC Oct 31,2018 04:34 AM UTC ASP.NET Core 5
Tags: Grid
JP Gutton
Asked On July 31, 2017 01:00 PM UTC


I have issues with the Grid control when using UrlAdaptor for DataManager. The controller return json from a dynamic object, the rows are shown in the Grid but I can't sort them or filter them, for sorting the up or down arrow is shown when clicking in the header but the rows' order stay the same, filtering does nothing.

If I switch to remoteSaveAdaptor, sorting/filtering works but then I have issue when adding a new row, the dialog template stay opened with the spinner running, if I refresh the page, the new row is present.

Any help will be appreciated.

Mani Sankar Durai [Syncfusion]
Replied On August 1, 2017 12:30 PM UTC

Hi Gutton, 

Thanks for contacting Syncfusion support. 

Query 1: I have issues with the Grid control when using UrlAdaptor for DataManager.  
   We have analyzed your and we suspect that you would like to perform sorting and Filtering operation when using UrlAdaptor in grid. When using the UrlAdaptor we suggest you to perform server side operation in grid when performing sorting, filtering, paging, grouping etc.., 
Refer the code example. 
                     .Datasource(ds => ds.URL("/Home/DataSource").Adaptor("UrlAdaptor")) 
                          .ToolbarSettings(toolbar => 
                toolbar.ShowToolbar().ToolbarItems(items => 
                     .Columns(col => 
           })    ) 
In the server side we can get it from the DataManager Class which contains the object for every grid actions like filtering, sorting, grouping, skip and take (i.e paging) etc..,  
Refer the code example. 
public ActionResult DataSource(DataManager dm) //Using DataManager class which contains Sorting, filtering as a parameter.   
        {….    } 
Please refer the below code example which contains server side operations. Using DataOperations class each actions in grid takes place. 

using Syncfusion.JavaScript.DataSources; 
using Syncfusion.Linq; 
using Syncfusion.JavaScript.Models; 
public ActionResult DataSource(DataManager dm) 
            IEnumerable data = OrderRepository.GetAllRecords().ToList(); 
            DataOperations operation = new DataOperations(); 
            if (dm.Sorted != null && dm.Sorted.Count > 0) //Sorting 
                data = operation.PerformSorting(data, dm.Sorted); 
          if (dm.Search != null && dm.Search.Count > 0) 
                Data = operation.PerformSearching(Data, dm.Search);  //perform search operation in grid. 
            if (dm.Where != null && dm.Where.Count > 0) //Filtering 
                data = operation.PerformWhereFilter(data, dm.Where, dm.Where[0].Operator); 
            int count = data.Cast<EditableOrder>().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 }); 
        public class DataResult 
            public IEnumerable result { get; set; } 
            public int count { get; set; } 
Refer the documentation link.  
Refer the KB link of how to perform server side grid actions 
We have also prepared a sample that can be downloaded from the below link. 

Query 2: If I switch to remoteSaveAdaptor, sorting/filtering works but then I have issue when adding a new row, the dialog template stay opened with the spinner running, 
We have checked based on your query and when using remoteSaveAdaptor grid actions like sorting, filtering, paging will takes place locally. When editing we have checked with dialog template and we are not able to reproduce the reported issue. If you are performing server side CRUD operation refer the documentation link 
Refer the online sample link: 
If you still face the issue please get back to us with the following details. 
1.       Share the screenshot/ video of the issue that you have faced. 
2.       Share the full grid code  
3.       Share the controller page 
4.       If possible please reproduce the issue in the simple sample 
The provided information will help us to analyze the issue and provide you the response as early as possible. 
Please let us know if you need further assistance 
Manisankar Durai. 

Replied On October 29, 2018 02:29 PM UTC

Hi. Please give an updated working example from Query1 for ASP NET Core Razor Pages (Essential JS 1). I tried to build a similar example on Razor Pages, but DataManager dm is always empty.

Vignesh Natarajan [Syncfusion]
Replied On October 30, 2018 09:26 AM UTC

Hi Costa, 
Thanks for using Syncfusion products. 
From your query, we understand that you are facing issue while using Url Adaptor with razor view pages in ASP.NET Core. We have already documented your request in our knowledge base section. Kindly refer the below link for the knowledge base document 
As per your request we have prepared a sample using razor pages in ASP.NET Core and URL adaptor which can be downloaded from below link 
If you still face the issue please get back to us with more details regarding the issue   
Vignesh Natarajan 

Replied On October 30, 2018 11:44 AM UTC

Greetings the best Support Service I have ever seen. Thank you!

Vignesh Natarajan [Syncfusion]
Replied On October 31, 2018 04:34 AM UTC

Hi Costa, 

Thanks for the update.  

We are happy to hear that your query has been resolved by our solution. 

Please get back to us if you have any further queries. 

Vignesh Natarajan 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon