I want to add currency format to Data Row in AspxPivotGrid table. You can see the below picture,how it is displaying now. So I just want to display currency format to 3 fields (ExtendedPrice,ExtendedCost,Profit)
This is my c# code:
if (i == 8 || i == 9 || i == 10 || i == 11)
{
DevExpress.Web.ASPxPivotGrid.PivotGridField newF = new DevExpress.Web.ASPxPivotGrid.PivotGridField(names[i], PivotArea.DataArea);
newF.ID = "field" + newF.FieldName;
//newF.ValueFormat.FormatType=
ASPxPivotGrid1.Fields.Add(newF);
}
Per this doc (FormatInfo) I think it should be set like that:
newF.ValueFormat.FormatType = FormatType.Numeric;
newF.ValueFormat.FormatString = "c2";