Click here to Skip to main content
15,904,156 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I am programatically adding data in the column "Data". In the first cell the value is 1365 but when i divide that value is becomes 136.5 and datagrid shows 137. I dont know what is wrong. Please help.
Thanks in advance.
Posted

1 solution

The datatype of your column is probably set to an int, which cannot contain decimals. Change the datatype of your column to a decimal

Eduard
 
Share this answer
 
Comments
NimitVachhani 18-Apr-11 3:18am    
Hi Eduard,
That worked.Well that's silly of me. Well it's been 3 months since i have started coding in .net. Thanks for help. Will keep that in mind.
Eduard Keilholz 18-Apr-11 3:28am    
You may want to press the 'Accept Answer' button. Others will spend time answering your question whil you're problem is already solved ;)
Glad I could help, Cheers!
Eduard

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900