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

Format % but do not multiply by 100 and show empty when null

1 Answer 8 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Jan Paolo
Top achievements
Rank 1
Jan Paolo asked on 07 Dec 2018, 09:15 PM

Hello,

How do I format data (e.g. in GridViewDataColumn) to have a "%" prefix?
We do not want the value to be multiplied by 100 (e.g. when user enters "1", it should show "1%" instead of "100%")

Also, when data is null, it should show an empty field, "", instead of "%".

 

Thank you,

Jan

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 12 Dec 2018, 11:49 AM
Hi Jan,

A possible solution for achieving this is to apply an IValueConverter to the DataMemberBinding of the column. You can also take a look at the Value conversion with IValueConverter article for more detailed look over the approach. Would this be a feasible solution for you?

Regards,
Stefan
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
GridView
Asked by
Jan Paolo
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or