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.

Summary column format

Thread ID:

Created:

Updated:

Platform:

Replies:

49833 Sep 28,2006 01:24 AM Sep 28,2006 01:02 PM Windows Forms 2
loading
Tags: Grouping
jamesb
Asked On September 28, 2006 01:24 AM

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.gridGroupingControl.TableDescriptor.SummaryRows.Add(row);

this is not working? Please help

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

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));

Thanks,
Haneef

jamesb
Replied On September 28, 2006 01:02 PM

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);";

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.

;