I want to set the datagridview values in number format. Currently I am getting this:
You have to spot, that all the data on your first screenshot are left aligned.
The formatting you try, and the others adviced are good. I must note, DefaultCellStyle most be used before you add columns to the grid. The case, that it seems specified formats does not work, tells me your data type may be string, not numeric.
You can Set you Format String using CellStyle Builder an set the Custom format to # mm
How to do it :
If you want to do it from Code, put this code inside Form_load event.
dgvmain.Columns["Amount"].DefaultCellStyle.Format = "N2";
Try
dgvmain.Columns["Amount"].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
Goto your Form's Design mode then goto the properties of dgvmain there check DefaultCellStyle and set the format as you like.
OR
you can do this
dgvmain.Columns["Amount"].DefaultCellStyle.Format = "N2";
:)