N
nick
I'm having a really weird problem. Take a look at this screenshot.
http://users.aber.ac.uk/njb4/dotnetproblem1.jpg
Notice the 4 watches at the bottom, _totalRecords, MyDataGrid.PageSize
and TotalPages.Text.
Now, you'd think that if _totalRecords was 11, and MyDataGrid.PageSize
was 10... If you divide them, you get 1.1. If you Ceiling 1.1 them
you'd get two.
Unfortunately, it's somehow dividing 11 by 10, but getting 1.0. I have
established that it is actually changing the value, because if i set
the default value of _totalPages to say 0.5, the line with the division
operator will change it to 1.0.
Is this a bug in the math library? Or am I doing something blatantly
wrong?
Thanks!
http://users.aber.ac.uk/njb4/dotnetproblem1.jpg
Notice the 4 watches at the bottom, _totalRecords, MyDataGrid.PageSize
and TotalPages.Text.
Now, you'd think that if _totalRecords was 11, and MyDataGrid.PageSize
was 10... If you divide them, you get 1.1. If you Ceiling 1.1 them
you'd get two.
Unfortunately, it's somehow dividing 11 by 10, but getting 1.0. I have
established that it is actually changing the value, because if i set
the default value of _totalPages to say 0.5, the line with the division
operator will change it to 1.0.
Is this a bug in the math library? Or am I doing something blatantly
wrong?
Thanks!