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.

Help to format a column in grid group control

Thread ID:

Created:

Updated:

Platform:

Replies:

100279 Jul 21,2011 12:02 PM Jul 27,2011 06:31 AM Windows Forms 1
loading
Tags: GridControl
rayzhahng
Asked On July 21, 2011 12:02 PM

I try the following code, and format does not work, if I use an arraylist as the datasource, the format work, any idea why?
Thanks,


DataTable dt = new DataTable();
System.Data.DataRow dr = dt.NewRow();
DataColumn dc = new DataColumn("id");

dt.Columns.Add(dc);
dc = new DataColumn("amount");

dt.Columns.Add(dc);

dr[0] = "001";
dr[1] = 20.03;
dt.Rows.Add(dr);


this.gridGroupingControl1.DataSource = dt;
this.gridGroupingControl1.TableDescriptor.Columns[1].Appearance.AnyRecordFieldCell.Format = "$##,##0.##";


Ragamathulla B [Syncfusion]
Replied On July 27, 2011 06:31 AM

Hi Rayzhahng,

We deeply regret for the delay.

You can achieve your desired format using ‘CellvalueType’ property. For more details follow the code.

this.gridGroupingControl1.TableDescriptor.Columns[1].Appearance.AnyRecordFieldCell.CellValueType = GetType(double);


Let me know if you have any concern.

Regards,
Ragamathullah B.



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.

;