Can't find what you're looking for?

Contact us or post in our forums and we'll help you find an answer.

Set format for Footer cells in C1FlexGrid

Background:

How to set format for Footer cells in FlexGrid

Steps to Complete:

The format property of the Column class in FlexGrid is not applied to the Footer cells of that Column. In order to set the format for footer cells explicitly, you can handle the grid’s OwnerDrawCell event as given in the code snippet below:

private void C1FlexGrid1_OwnerDrawCell(object sender, OwnerDrawCellEventArgs e)
{
 if (e.Col == c1FlexGrid1.Cols["ColumnName"].Index && e.Row == c1FlexGrid1.Rows.Count - 1)
 {
   double d = Convert.ToDouble(e.Text);
   e.Text = String.Format("{0:#,##0.00}",d);  
 }
}
Get the Latest Version of WinForms Edition
Download the Free Trial Now