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.

Total of groups with Percentages

Thread ID:





35488 Oct 1,2005 08:10 AM Oct 3,2005 10:00 AM Windows Forms 2
Tags: GridControl
Asked On October 1, 2005 08:10 AM

I have a GGC with two nested parent-child tables, Orders and Details with a single DataRelation relating on the column OrderID. The Details table also contains columns ItemID and Qty. I use the column ItemID for grouping the details. I''d like to show the total of order details for each ItemId. At the end (or beginning) of each group of details, I''d like a summary row that shows total number of detail rows containing the ItemID followed by a Percentage (of the grand total number of rows) and total Qty of that ItemID followed by a percentage of the total Qty. At the very end (or beginning), I''d like a grand total summary row showing the total number of detail rows and total Qty. Example: [ItemID 1 Details...] ItemID 1- 40 details: 33.3% Qty 60: 33.3% [ItemID 2 Details] ItemID 2- 20 details:16.7 % Qty 40: 22.3% [ItemID 3 Details...] ItemID 3- 60 details: 50% Qty 80: 44.4% Grand Total- 120 details Qty 180 Thanks, Van Baker

Administrator [Syncfusion]
Replied On October 3, 2005 07:46 AM

One way you can do this is to go ahead and add a summary row that just shows the totals. Then you can handle QueryCellStyleInfo, and adjust the displayvalues at that point. Here is a minimal sample. http://www.syncfusion.com/Support/user/uploads/GGC_Percents_4482bab4.zip

Replied On October 3, 2005 10:00 AM

Thanks, Clay. Your example is just what I was looking for. --Van Baker


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.

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.