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

Total of groups with Percentages

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

2 Replies

AD Administrator Syncfusion Team October 3, 2005 11:46 AM UTC

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


VB vbaker October 3, 2005 02:00 PM UTC

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

Loader.
Live Chat Icon For mobile
Up arrow icon