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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Sorting of Average data shown in Summary In Caption

Thread ID:

Created:

Updated:

Platform:

Replies:

71669 Feb 8,2008 03:05 PM Feb 13,2008 01:20 PM ASP.NET Web Forms (Classic) 1
loading
Tags: GridGroupingControl
Rekha Mallavarapu
Asked On February 8, 2008 03:05 PM

Hi,

In your examples for "Summary In Caption" for GridGroupingControl (http://www2.syncfusion.com/syncfusion2_0/Web/Grid.Grouping.Web/samples/2.0/Summaries/SummaryInCaption/cs/SummaryInCaption.aspx), how can I sort descending order only for the Average Freight values for a given group?

What I would like to see is Ship via grouping is closed and the average Frieght values are sorted in descending order. I donot want the individual values inside a group be sorted.

Please provide a sample.

Thanks,

Rekha



Administrator [Syncfusion]
Replied On February 13, 2008 01:20 PM

Hi Rekha,

Thank you for your interest in Syncfusion products.

Essential Grid web allows you to sort the groups by the value of a summary.

This can be achieved by specifying your own comparer using GroupSortOrderComparer of SortColumnDescriptor . Or You can use SetGroupSummarySortOrder method of SortColumnDescriptor.

The following code snippet illustrates this.

[C#]

SortColumnDescriptor gsd = new SortColumnDescriptor("ShipVia");
gsd.SetGroupSummarySortOrder(summaryColumn2.GetSummaryDescriptorName(), "FreightTotalAvg");

//gsd.GroupSortOrderComparer = new CustomComparer(summaryColumn1.GetSummaryDescriptorName(), "FreightTotalAvg");

this.GridGroupingControl1.TableDescriptor.GroupedColumns.Add(gsd);

You can also specify the sort order using SortDirection of SortColumnDescriptor .

Please refer the sample in the below link on sorting summary values.

http://websamples.syncfusion.com/samples/Grid.Web/5.1.0.51/I41390/main.htm

[Note : When you click on plus symbol , grid show with descending order of summary fields. ]

Please let me know if this helps you.

Regards,
Jaya



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

;