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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Summary column format

Thread ID:





49833 Sep 28,2006 05:24 AM UTC Sep 28,2006 05:02 PM UTC WinForms 2
Tags: Grouping
Asked On September 28, 2006 05:24 AM UTC

I have two summary rows and I am trying to set the format and text alignment of specific columns on the summary when the ggc load.

I am setting the format and text alignment when before I add the summary column to the summary row like below

WeeksSpotsSummaryColumn.Appearance.AnyRecordFieldCell.Format = "#,##0;($#,##0);";

row = new GridSummaryRowDescriptor("SummaryRow", WeeksSpotsSummaryColumn);
row.Visible = true;

this is not working? Please help

Administrator [Syncfusion]
Replied On September 28, 2006 09:48 AM UTC

Hi James,

The GridSummaryColumnDescriptor.Format property used to format the text displayed in the summary column. A format string consists of the propertyname of the summaryType and the format specifier known form String.Format, e.g ({Average: ##.00}).

You can use the HorizontalAlignment property to align the text in summary cell. Below is a code snippet.

GridSummaryColumnDescriptor sd = new GridSummaryColumnDescriptor();
sd.DataMember= "Quantity";
sd.DisplayColumn = "Quantity";
sd.Format = "{Sum: #,##0;($#,##0)}";

sd.Appearance.AnySummaryCell.HorizontalAlignment = GridHorizontalAlignment.Center;
sd.SummaryType = SummaryType.DoubleAggregate;

this.gridGroupingControl1.TableDescriptor.SummaryRows.Add(new GridSummaryRowDescriptor("Quantity", "Sum :", sd));


Replied On September 28, 2006 05:02 PM UTC

Thanks for your help

how else would i have know that these two are not the same...

sSpotsSummaryColumn.Appearance.AnyRecordFieldCell.Format = "#,##0;($#,##0);";

SummaryColumn..Format = "#,##0;($#,##0);";


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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon 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.Close Icon