You can Set you Format String using CellStyle Builder an set the Custom format to # mm
How to do it :
- Right click on Grid, then Properties
- In the property window, click the button that will popup up the Edit Columns Dialog
- Select the cell you want to format
- On the right side of the Edit Columns Dialog select the DefaultCellStyle property Click the DefaultCellStyle property, then the CellStyleBuilder dialog will open Here you have
the format property, this will give you the Format String Dialog
- Set the Custom property to N2 you will see the preview at the bottom
- Click OK ... till you are back to your Grid...
If you want to do it from Code, put this code inside Form_load event.
dgvmain.Columns["Amount"].DefaultCellStyle.Format = "N2";