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.
Syncfusion Feedback

Formating in the Cell

Thread ID:

Created:

Updated:

Platform:

Replies:

60432 May 4,2007 01:25 PM UTC May 4,2007 03:14 PM UTC Windows Forms 1
loading
Tags: Grouping
ejaz
Asked On May 4, 2007 01:25 PM UTC

Hi,
I am using GGC and need to format the content of the cell.it is having summary cell as well and I need to format summary content as well

ex; if Cellvalue is 234567.580 I need to format it as 234567.58 or 234567.6 rounded off

could you pls help.if possible some code exemple would be highly appreciated

thanks,
Ejaz

haneefm [Syncfusion]
Replied On May 4, 2007 03:14 PM UTC

Hi,

The GridSummaryColumnDescriptor.Format string used to format the text to display in the summary column. A format string consists of the PropertyName of the summaryType and a format specifier known from String.Format, e.g. {Average:###.00}. Colud you try this code

//SummaryCell description in a grid.
GridSummaryColumnDescriptor sd = new GridSummaryColumnDescriptor();
sd.DataMember= "DataColumName";
sd.DisplayColumn = "DisplayColumnName";
sd.Format = "{Sum:F1}";
sd.SummaryType = SummaryType.DoubleAggregate;

//Adding SummaryCell in a grid.
this.gridGroupingControl1.TableDescriptor.SummaryRows.Add(new GridSummaryRowDescriptor("Col2", "Sum", sd));

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.

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

;