P
pvong
I have a Gridview that I want to format the values so it looks like this.
Currently What I Want
25.6 25.60%
1.2 1.20%
100 100.00%
Basically, I always want two zeros after the decimal.
I know {0:c} does currency and {0:d} does dates. What converts decimals?
According to this site, I'm suppose to use {0:d} which is already taken by
date.
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.boundfield.dataformatstring.aspx
Currently What I Want
25.6 25.60%
1.2 1.20%
100 100.00%
Basically, I always want two zeros after the decimal.
I know {0:c} does currency and {0:d} does dates. What converts decimals?
According to this site, I'm suppose to use {0:d} which is already taken by
date.
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.boundfield.dataformatstring.aspx