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

Need help with groupinggrid summary information

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!

4 Replies

AD Administrator Syncfusion Team October 13, 2004 12:25 PM UTC

Never mind. I figured it out.


AD Administrator Syncfusion Team October 13, 2004 12:30 PM UTC

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


AD Administrator Syncfusion Team October 13, 2004 02:21 PM UTC

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


AD Administrator Syncfusion Team October 14, 2004 11:05 AM UTC

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

Loader.
Live Chat Icon For mobile
Up arrow icon