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

String Formats not working in Telerik MVC Grid

0 Answers 105 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.
Kevin
Top achievements
Rank 1
Kevin asked on 20 Nov 2011, 11:34 PM
According to the following article, if you want to format the max number of decimal places to say 4, but have it chop off trailing zeros 0, you use something like this:
columns.Bound(p => p.Rate).Width(52).Format("{0:####.####}")
http://www.csharp-examples.net/string-format-double

But it doesn't remove the trailing zeros.  I need to really save space in this grid, it has like over 10 rate columns that need to be displayed.  In most cases the rates only go to 2 or 3 places, but a few of them need 4.

Steve



Tags
Grid
Asked by
Kevin
Top achievements
Rank 1
Share this question
or