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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SfDataGrid - sorting within groups

Thread ID:

Created:

Updated:

Platform:

Replies:

121473 Dec 17,2015 04:38 PM UTC Nov 10,2016 09:57 AM UTC WPF 3
loading
Tags: SfDataGrid
Matthew Korth
Asked On December 17, 2015 04:38 PM UTC

The program I'm working on presents a list of customers in a grid, in sorted order. Because the list is getting rather large (about 2,650 customers at last count), I'd like to start grouping it as well, by the first character of the customer name.

I've given it appropriate GroupColumnDescription and SortColumnDescription definitions in my .xaml file:

            <sync:SfDataGrid.GroupColumnDescriptions>
                <sync:GroupColumnDescription ColumnName="CustomerName" Converter="{StaticResource customerListItemConverter}"  />
            </sync:SfDataGrid.GroupColumnDescriptions>
            <sync:SfDataGrid.SortColumnDescriptions>
                <sync:SortColumnDescription ColumnName="CustomerName" SortDirection="Ascending" />
            </sync:SfDataGrid.SortColumnDescriptions>

Given these definitions, I would expect to see the list of groups in sorted order, and within each group, to see the customers in that group, also in sorted order. What I get... well, that's a different matter. The order of the groupings is as expected; the order of the customers within each group is not.

For example, under "3", I would expect to see customers listed in this order:
  • 3
  • 39N
  • 3D
  • 3H
  • 3M
  • 3P
  • 3Sigma

Instead, I get this:

  • 3
  • 39N
  • 3Sigma
  • 3D
  • 3M
  • 3P
  • 3H

The Interval Grouping sample was unfortunately not helpful, as it exhibits similar behavior (it's ostensibly sorted in ascending order by shipped date, but the dates go from 1991-05-15 to 1991-05-23, then back to 1991-05-17).

Is there any way to get this to happen?


Sowndaiyan Paulpandi [Syncfusion]
Replied On December 18, 2015 01:48 PM UTC

Hi Matthew,


Thanks for contacting Syncfusion Support.

We have analyzed your query. In SfDataGrid Currently we do not have the support for apply the Sorting on Grouped column. Thank you for helping us define this feature. We have consider this as a feature and we have include this feature in end of the January 2016.

Please let us know if you require further assistance on this.


Regards,

Sowndaiyan


Bernd
Replied On November 9, 2016 11:09 AM UTC

Hello Sowndaiyan,

is sorting of groups implemented by now?

Regards
Bernd

Jai Ganesh S [Syncfusion]
Replied On November 10, 2016 09:57 AM UTC

  
Hi Bernd, 
  
We have provided the support for apply the Sorting on Grouped column and this will be available from our 14.2 release and in our Essential Studio Volume 3 SP 1, 2016 (Version 14.3.0.52) is rolled out and is available for download under the following link. 
  
            
After installing the Essential studio, you can achieve your requirement by setting the SortGroupRecords as "True” in GroupColumnDescription like below, 
                                    
   <syncfusion:SfDataGrid.GroupColumnDescriptions> 
                <syncfusion:GroupColumnDescription ColumnName="Name" Converter="{StaticResource groupingConverter}" SortGroupRecords="True" /> 
  </syncfusion:SfDataGrid.GroupColumnDescriptions> 
 
 
 
Regards, 
Jai Ganesh S 


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.

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

;