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. Image for the cookie policy date
close icon

Grouped grid does not sorting columns non grouped columns

In version v17.4.47  when grid is grouped, sorting on other column does not changing orders of records.
Grid shows order indicator and tag with number 2 but records remain unsorted.
I did try enable multiple sorting on grid properties but.
There is no errors in console, or in vs.


3 Replies

AH Admir Hodžic February 5, 2020 08:13 PM UTC

Apologies for opening.
This is not bug,
I have problem with my data, and grid there is no issues with syncfusion 
I am using 2 columns for one data source column.
I am trying to separate date from time and for one source column with datetime I am trying to display two columns in grid.
I was surprised that this even work.
Apologies for spamming     


AH Admir Hodžic February 5, 2020 08:19 PM UTC

Once again apologies for many posts,
But looks like there is issue with sorting.
If grid is grouped by datetime column, sorting  other columns does not work any more.



VN Vignesh Natarajan Syncfusion Team February 6, 2020 06:44 AM UTC

Hi Admir,  

Thanks for contacting Syncfusion forums. 

Query: “If grid is grouped by datetime column, sorting  other columns does not work any more.” 

We have validated the reported issue by preparing a sample as per your suggestion. To replicate the reported issue we have grouped the Date column first. Then tried to sort the other column. We are able to reproduce the reported behavior at our end.     

By default once a column is grouped it will be sorted and will be moved to hidden state. Now sorting the other column is like MultiSorting approach. In your case, first column will be sorted and grouped based on the original dataSource, when we sort any other column the sorting will be applied based on the first column which is grouped and sorted.  So sometimes it might look like sorting is not applied. But it depends upon the values from the data source.  

Consider (In attached sample) we have used two column, OrderDate and CustomerID columns. First we have grouped the OrderDate Column. Now OrderDate column will be grouped and Ascending order (sort) will be applied to it. Now click on CustomerID column header to sort the column. Since already one column is sort and grouped, now sorting will be applied to already sorted groups. So it might looks like sorting is not performed. But it depends upon the dataSource value.      

To explain more clearly we have prepared a sample which contains same date value in more that 5 records. Refer the below sample for your reference 


Note: In above sample you will be able to sort other column when date column grouped.  

If you are still facing the issue, kindly get back to us with more details.              

Regards, 
Vignesh Natarajan.  
 


Loader.
Live Chat Icon For mobile
Up arrow icon