EJ2 Grid: sortSettings Column order reversed on query

With a standard grid, when you set the column order for sortSettings, the grid control displays the right order but what it submits to the server is reversed.  This in turn messes up the query response.


Grid Code:

sortSettings: { columns: [
                { field: 'start_date', direction: 'Ascending' },
                { field: 'due_date', direction: 'Descending' },
                ] },

Payload sent to server:

{
"requiresCounts": true,
"sorted": [
{
"name": "due_date",
"direction": "descending"
},
{
"name": "start_date",
"direction": "ascending"
}
]
}



1 Reply

AG Ajith Govarthan Syncfusion Team July 22, 2021 04:06 PM UTC

Hi Mark, 

Thanks for contacting Syncfusion support. 

Query: With a standard grid, when you set the column order for sortSettings, the grid control displays the right order but what it submits to the server is reversed.  This in turn messes up the query response. 
 
Based on your query you are facing the sortSettings direction mismatch issue in your Grid application. So, before we proceed to your query, please share the below details to find the root cause of the issue. 

  1. Share the complete Grid code example.

  1. Please share the data adaptor used in your Grid application.
 
  1. Have you faced the sort order mismatch issue only for initial sorting?
 
  1. Does the sorting order is changed in the UI level also?
 
  1. Share the Syncfusion package version.
 
Regards, 
Ajith G. 


Loader.
Up arrow icon