468,457 Members | 1,762 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,457 developers. It's quick & easy.

Need Help for Round the Value

Hi Every Body,
I have tow columns in the database, the third
columns the division of both columns. The first two columns are both of type
decimal,
when the third columns get value its type is also decimal,
for example
first col value 34.00
second col value 34.00
third col value 34.00/34.00 = 1.000000000
Now when i am trying to bind that value with asp.net datagrid, I am try to
round it using Math.Round() function to precision of 2
for example
Math.Round(DataBinder.Eval(Container.DataItem,"thi rd
Col"),2)
At this point it generate error and all fields which are binded after that
field are not bind properly

Regards

Muhammad Jamil Nawaz
Nov 19 '05 #1
1 2366
Hi,

What is the error message you are getting....?

Make sure that you don't have a zero (0) in your second column. Otherwise
you may get a "divisible by zero" error.

Anyway post your error message, sot hat we can discuss further.

Cheers,

Jerome. M

"msnews.microsoft.com" wrote:
Hi Every Body,
I have tow columns in the database, the third
columns the division of both columns. The first two columns are both of type
decimal,
when the third columns get value its type is also decimal,
for example
first col value 34.00
second col value 34.00
third col value 34.00/34.00 = 1.000000000
Now when i am trying to bind that value with asp.net datagrid, I am try to
round it using Math.Round() function to precision of 2
for example
Math.Round(DataBinder.Eval(Container.DataItem,"thi rd
Col"),2)
At this point it generate error and all fields which are binded after that
field are not bind properly

Regards

Muhammad Jamil Nawaz

Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by leegold2 | last post: by
1 post views Thread by roll | last post: by
9 posts views Thread by Ronald W. Roberts | last post: by
4 posts views Thread by Fuzzydave | last post: by
2 posts views Thread by Tsair | last post: by
4 posts views Thread by Jassim Rahma | last post: by
9 posts views Thread by Verizon News Server | last post: by
3 posts views Thread by Yonih | last post: by
4 posts views Thread by Yonih | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.