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