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. Image for the cookie policy date
close icon

Help to format a column in grid group control

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.##";


1 Reply

RB Ragamathulla B Syncfusion Team July 27, 2011 10:31 AM UTC

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.



Loader.
Live Chat Icon For mobile
Up arrow icon