Page 1 of 1

CrDBGrid summary values with float fields

Posted: Sun 22 Jan 2006 14:13
by hotdog
If a column holds the data of a standard double(15,3) mysql field and the sum of it's values is ((-10 10)) at that case the sum of values is rounded to the nearest integer value. For example, if the sum is 10.2 I see the integer part (10) without any decimal places in the grid's summary row. Please note that the values I use in this particular project have one decimal point. I haven't checked the behaviour with values of bigger precision.

I set the columns[]->floatprecision and the columns[]->floatdigits properties to "1" with no luck at all. The columns[]->floatformat doesn't help too.

Getting by code the Columns[]->TotalValue works as expected. However, the Columns[]->TotalString displays the same rounded value as the grid does.

Please help if I'm missing something here.

Thanks in advance,
Chris

Posted: Mon 23 Jan 2006 15:11
by Ikar
The FloatPrecision property points to total count of digits: before floating point and after floating point but without floating poin itself. To show 10.2 you should type columns[]->floatformat = 3, to show 100.54 value 3+2=5 is correct.