This is a migrated thread and some comments may be shown as answers.

[Solved] Grid Not Formatting Percents

1 Answer 32 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jordan
Top achievements
Rank 1
Jordan asked on 26 Jul 2010, 01:21 PM
Hey Everyone,

I'm having a small problem with the use of the Format strings on the Grid control.  For some reason, I cannot get it to work at all.

The following is the code that I am using to set the format:

columns.Bound(column => column.Percent).Format("{0:#0.##%}").Title("% Complete");

For some reason, this just doesn't work for me.  By my understanding, this should lead the grid to display a value of 0.1234 as 12.34%.  Instead it simply displays 0.1234.  Any thoughts on what I'm doing wrong?

1 Answer, 1 is accepted

Sort by
0
Jordan
Top achievements
Rank 1
answered on 26 Jul 2010, 03:29 PM
Never mind on this.  I'm not sure why, but it just started working.  I love coding!
Tags
Grid
Asked by
Jordan
Top achievements
Rank 1
Answers by
Jordan
Top achievements
Rank 1
Share this question
or