dataGrid shows different value

  • Thread starter Thread starter Chi Tang
  • Start date Start date
C

Chi Tang

Hi,

Does anybody know how to format a float value before set this value to sql
dataset? For example, I need to set a float value 12.7 to a dataGrid but
the output shows on the grid appears as '12.6999999'. Which part I need to
do something on c# or sql database? Thanks for any help,

CT
 
write a function to map(filed1) to the format you wanted, then in datagrid,
when display field1, call the function frist:
e.g.
before you display the filed as
field1
now as
myMap(field1)

good luck.

Bangh
 
Back
Top