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

Default format issue

Thread ID:





71506 Feb 3,2008 10:05 AM UTC Feb 11,2008 01:02 PM UTC WinForms 3
Tags: GridControl
Asked On February 3, 2008 10:05 AM UTC

I am able to perform formatting for SummaryRowColumn, using "{Sum:f2}" such type format. But the problem is if i am setting
null in DataType Format then the format goes such a way {Sum:} and the SummaryRowColumn has seen in the earlier format.I need to set
my summaryrowcolumn value corresponding to the values in the column(Default format).

Please help me

Jeba S [Syncfusion]
Replied On February 6, 2008 06:12 AM UTC

Hi Manjesh,

Sorry for the delay in response.

You can apply the same format of the column to the SummaryRowColumn by handling the QueryCellStyleInfo event handler. In the event handler get the format of the column using the GridColumnDescriptor and assign that format to the summary row.

private void gridGroupingControl1_QueryCellStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfoEventArgs e)
GridTableCellStyleInfoIdentity id = e.TableCellIdentity;
if (id.DisplayElement.Kind == DisplayElementKind.Summary )
if (id.SummaryColumn != null
&& id.SummaryColumn.Name == "Sum2")
GridTableDescriptor td = e.TableCellIdentity.Table.TableDescriptor as GridTableDescriptor;
GridColumnDescriptor cd = td.Columns[id.SummaryColumn.DisplayColumn];
string format = "{0:" + cd.Appearance.AnyRecordFieldCell.Format + "}";
int iCellValue = Convert.ToInt32(e.Style.CellValue);
e.Style.Text = string.Format(format, iCellValue);

Please refer the sample and let us know if this helps.


Replied On February 11, 2008 11:37 AM UTC

Thanks a lot for your detailed clarification,
Sorry to tolerate u,

Once again thanks a lotttt

Jeba S [Syncfusion]
Replied On February 11, 2008 01:02 PM UTC

Hi Manjesh,

Thank you for your update.



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