troubleshooting Question

GridView Decimal Format

Avatar of Scripter25
Scripter25 asked on
C#ASP.NET
13 Comments1 Solution12463 ViewsLast Modified:
I have a GridView with a decimal value in it This decimal value can be up to 4 digits to the right of decimal point but how do I get it to display only two digits if the far right 2 are 0's  in other words say I have a decimal that is .21 and one that is .212  how I currently have the Gridview setup it will display the values as .2100 and .2120

This is the formula I used for the data format {0:D}
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 13 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 13 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros