void gridGroupingControl1_TableControlDrawCellDisplayText(object sender, GridTableControlDrawCellDisplayTextEventArgs e)
{
GridTableCellStyleInfo style = e.Inner.Style as GridTableCellStyleInfo;
if ((style.TableCellIdentity.TableCellType == GridTableCellType.RecordFieldCell
|| style.TableCellIdentity.TableCellType == GridTableCellType.AlternateRecordFieldCell)
&& style.TableCellIdentity.Column.Name == "Amount"
)
{
e.Inner.DisplayText = string.Format("{0:£##0.00}", style.CellValue);
}
}
void gridGroupingControl1_TableControlDrawCellDisplayText(object sender, GridTableControlDrawCellDisplayTextEventArgs e)
{
GridTableCellStyleInfo style = e.Inner.Style as GridTableCellStyleInfo;
if ((style.TableCellIdentity.TableCellType == GridTableCellType.RecordFieldCell
|| style.TableCellIdentity.TableCellType == GridTableCellType.AlternateRecordFieldCell)
&& style.TableCellIdentity.Column.Name == "Amount"
)
{
e.Inner.DisplayText = string.Format("{0:£##0.00}", style.CellValue);
}
}
private void Form1_Load(object sender, EventArgs e)
{
this.gridControl1.ColStyles[1].Text = "000";
this.gridControl1.ColStyles[1].Format = "C";
this.gridControl1.ColStyles[1].CellValueType = typeof(double);
}