I have datas as unitprice with 10 decimal places in access database. I want those decimal places to reduce when it comes to datagridview(round to 2 places). How can i achieve this. Any idea.
Thanks in advance
I have datas as unitprice with 10 decimal places in access database. I want those decimal places to reduce when it comes to datagridview(round to 2 places). How can i achieve this. Any idea.
Thanks in advance
You could round it when retrieving it, but I would recommend to round only the displayed value (because you might need the original value for some calculus).
So here is how you format the first column to round to 2:
grid.Columns(0).DefaultCellStyle.Format = "D2";