I would like to remove the extra zeros if they don’t have any decimal values. But if they have, I would like to show them.

In the picture, I want to height the unnecessary 0 from the 10.00 and 20.00. But I want to show the other 3 records below.
I used c#, asp.net 4.0 and GridView to display .
I can’t see the picture, but it sounds like you just need a format string: The
#character represents a digit if it’s needed, and a0character represents that you’ll always have a digit. So a format string of"#.##"sounds like it might be what you need.