Grouped by X, but sorting by Y

Hello, I try to figure out, for two days an grouping issue.
I've a grouping with different columns, and I want to grouped by "regionname" column but i want to sort by "PatTotal".
When I call my grouping grid is working perfect, but when I expand the rows the sorting change, by regioname.
i want to keep the sorting by PatTotal.

Anybody know about this issue?

the code I using is:


this.GridGroupingControl1.TableDescriptor.GroupedColumns.Clear();
SortColumnDescriptor gsd = new SortColumnDescriptor("RegionName");
gsd.SortDirection = ListSortDirection.Descending;
gsd.GroupSortOrderComparer = new PatTotalComparer(summaryColumn2.GetSummaryDescriptorName(), "Sum");
this.GridGroupingControl1.TableDescriptor.GroupedColumns.Add(gsd);



1 Reply

RS Rajarajeswari S Syncfusion Team October 3, 2008 10:40 AM UTC

Hi Nicolas,

Thanks for using Syncfusion products.

Grouping a column will always sort the column. With SummaryInCaption, when you group a particular column, then the Grid is grouped and sorted based on the column. Now if you click on the other column (eg. EmployeeID) to sort, then the Grid will sort each group based on the column
(eg. EmployeeID). This is the default behavior of the control, and it works properly.

Please refer the sample from the below link, which illustrates this:

http://www.syncfusion.com/support/user/uploads/Sample_b8213fa4.zip


Please refer the video clip from the below link, illustrating the process clearly:

http://www.syncfusion.com/support/user/uploads/Summary_5309be95.zip

Please let me know if you have any other concerns.

Regards,
Raji




Loader.
Up arrow icon