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.

Need help with groupinggrid summary information

Thread ID:





20259 Oct 13,2004 08:08 AM Oct 14,2004 07:05 AM Windows Forms 4
Tags: GridControl
Administrator [Syncfusion]
Asked On October 13, 2004 08:08 AM

I''ve taken the example that comes with the groupinggrid and modified it to suit my needs. I changed the code to look like: GridSummaryColumnDescriptor sd0 = new GridSummaryColumnDescriptor(); sd0.DataMember = "geo_length"; sd0.DisplayColumn = "geo_length"; sd0.Format = "{Average:#.0}"; sd0.SummaryType = SummaryType.DoubleAggregate; gdBase.TableDescriptor.SummaryRows.Add(new GridSummaryRowDescriptor("Row 0", "Average", sd0)); Now I want to add Total, Minimum and Maximum summary rows, but, can''t seem to figure out how. Help!

Administrator [Syncfusion]
Replied On October 13, 2004 08:25 AM

Never mind. I figured it out.

Administrator [Syncfusion]
Replied On October 13, 2004 08:30 AM

Now my problem is how to show summary information for several columns. For example, I have five columns of which the first, second and fifth need to show a Total and Average values. I know how to setup the two summary rows (one for Total and another for Average) to show the summary for the first column. How do I get the second and fifth column''s summary to be included in the same two rows? TIA

Administrator [Syncfusion]
Replied On October 13, 2004 10:21 AM

You create summarycolumndescriptors for each summary column you want, and then add them to the same summary row. Attached is a little sample. //create 2 summary columns GridSummaryColumnDescriptor maxScore1 = new GridSummaryColumnDescriptor("maxScore1", SummaryType.Int32Aggregate, "score1", "{Maximum:#}"); GridSummaryColumnDescriptor maxScore2 = new GridSummaryColumnDescriptor("maxScore2", SummaryType.Int32Aggregate, "score2", "{Maximum:#}"); //create the summary row GridSummaryRowDescriptor maxRow = new GridSummaryRowDescriptor("Max", new GridSummaryColumnDescriptor[]{ maxScore1, maxScore2}); this.gridGroupingControl1.TableDescriptor.SummaryRows.Add(maxRow); GGCsummaries_4817.zip

Administrator [Syncfusion]
Replied On October 14, 2004 07:05 AM

Thank you Clay! That''s a way better example and explaination than I could find in the documentation.


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.