R
R Reyes
Hi, I'm having a weird problem. This datagridview keeps rounding my cell
values to an integer. Why does it do this and how can I stop it?
I am working with money and even after i set the ValueType of the cell to
typeof(double), it always tries to round to an int anyway.
Here's the code:
double dblNumber = 567.89;
dgv.Columns[4].ValueType = typeof(double);
dgv.Rows.Cells[4].Value = dblNumber;
// this always returns 568 ....why?
Any ideas on why this happens and how I can stop it?
Thanks for your time.
values to an integer. Why does it do this and how can I stop it?
I am working with money and even after i set the ValueType of the cell to
typeof(double), it always tries to round to an int anyway.
Here's the code:
double dblNumber = 567.89;
dgv.Columns[4].ValueType = typeof(double);
dgv.Rows.Cells[4].Value = dblNumber;
// this always returns 568 ....why?
Any ideas on why this happens and how I can stop it?
Thanks for your time.