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.

Displyaing the record unique column values in Summary

Thread ID:

Created:

Updated:

Platform:

Replies:

63174 Jun 28,2007 08:42 PM Jun 29,2007 07:38 PM Windows Forms 1
loading
Tags: Grouping
Soffia
Asked On June 28, 2007 08:42 PM

Hi ,

I am using the GridgroupingControl to display the output of my Custom collection. Can you please let me know on how to display the unique column values in summary Cells .

For eg I have 4 records

ID NAME, TYPE, VAL1, VAL2

12 ABC C 2 3
12 ABC C 3 4
13 EFG D 10 20
13 EFG D 20 30

I am grouping this by Id

So I want this to be displayed like below with alternate records of this group having different colors ( not rows in this group ).

+ 12 ABC C 5 7
+ 13 EFG D 30 50

I know how to display the ID, sum of VAL1 and VAL2. Appreciate if you can give any guidance on this.

Thanks,
Sofia

haneefm [Syncfusion]
Replied On June 29, 2007 07:38 PM

Hi Soffia,

The "Summaries For NestedTables And Groups" sample demonstrates the adding of Summaries through code. The summaries that are set for the top table are sufficient enough to create summaries in groups.

For creating summaries through code, create an instance of the GridSummaryColumnDescriptor specifying the summarytype, summarycolumn and formattype. Then create an instance of the GridSummaryRowDescriptor by passing the GridSummaryColumnDescriptor object. The GridSummaryRowDescriptor object can be added to the GridSummaryRowDescriptorCollection for the required table.

// Adding Summaries for the Details Table.
GridSummaryColumnDescriptor scd = new GridSummaryColumnDescriptor("Sum", SummaryType.Int32Aggregate, "Quantity", "{Sum:#}");
GridSummaryRowDescriptor srd = new GridSummaryRowDescriptor("Sum","Total", scd);
srd.Appearance.AnyCell.HorizontalAlignment = GridHorizontalAlignment.Right;
srd.Appearance.AnyCell.BackColor = SystemColors.Info;
this.gridGroupingControl1.GetTableDescriptor("Order Details").SummaryRows.Add(srd);

Sample : SummariesForNestedTablesAndGroups.zip

Also refer the Appearance category samples for more details.
C:\Documents and Settings\haneefm\My Documents\Syncfusion\EssentialStudio\5.1.1.0\Windows\Grid.Grouping.Windows\Samples\2.0\Appearance\StylesAtGroupLevel\cs

Best regards,
Haneef

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.

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.

;