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

Resort Groups by Caption Title

The following sorts groups by a summary column. How do I sort by the Group Caption itself?

myGrid.TableDescriptor.GroupedColumns(0).SetGroupSummarySortOrder(myGrid.TableDescriptor.SummaryRows(0).SummaryColumns(0).GetSummaryDescriptorName, "Sum", sortDirection)



3 Replies

RC Rajadurai C Syncfusion Team November 24, 2008 01:18 PM UTC

Hi DietzMJ,

Thanks for your interest in Syncfusion products.

Normally, when a table is grouped by a column, the table get sorted by the grouped column name which will be in the caption title (provided no columns in the sortedColumns list).

Hence to resort the groups which are sorted by summary column back to caption title.
1)Clear the sorted columns list.

this.gridGroupingControl1.TableDescriptor.SortedColumns.Clear();


This clears all the sorted columns present in list and shows sorted by caption title by default.

Regards,
Rajadurai



AD Administrator Syncfusion Team December 3, 2008 09:43 PM UTC

That doesn't clear any sorts done with the GroupedColumns(i).SetGroupSummarySortOrder() function. How do we clear that as well?



RC Rajadurai C Syncfusion Team December 4, 2008 11:12 AM UTC

Hi dietzMJ,

Thanks for your update.

In this function, the sort order is set through the grouped column. As there is no direct property to clear this sort order without affecting grouped column, you have to remove this grouped column to reset this sort behavior.

Regards,
Rajadurai


Loader.
Live Chat Icon For mobile
Up arrow icon