I want to format cells that are numeric in this way 1 231 241.45
. I've tried N2
format option:
datagridview1.Columns["col1"].DefaultCellStyle.Format = "N2";
But N2
format puts comma instead of space. I want space as number group separator.
Is it possible to change number group separator?
I managed to make it work with the following code:
string NRFormat="### ### ##0.00"
datagridview1.Columns["col1"].DefaultCellStyle.Format = NRFormat;
datagridview1.Columns["col2"].DefaultCellStyle.Format = NRFormat;
It's not very elegant, but it's working.