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

Percent EditorTemplate

1 Answer 53 Views
NumericTextBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Eduardo
Top achievements
Rank 1
Eduardo asked on 23 Jan 2012, 08:14 PM
Hi, I've a class with a property set with [DataType("Percent")] attribute, I would expect that the grid show that field formatted (with '%' character, like the currency '$') but it only shows the number. Is this the true funcionality or a bug or I miss something?

Eduardo.

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 25 Jan 2012, 10:54 AM
Hello Eduardo,

 Yes, this behavior is expected. If you want to show the percentage symbol, you need to use .Format()
e.g.
columns.Bound(p => p.PercentageValue).Width(130).Format("{0:p}");


Regards,
Georgi Tunev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
Tags
NumericTextBox
Asked by
Eduardo
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or