How to show a percentage & dollar symbol

1 Answer 4571 Views
Grid
Awais
Top achievements
Rank 1
Awais asked on 22 Oct 2012, 08:35 AM
Hello,

I am creating a grid and I just want to show a symbol of % and $ with certain data. Actually if I put a % sign with data on server side then kendo itself process it and convert the data in percentage. All I want to show the data as it is that come from the server side. I know that kendo process data in percentage but rite now I don't want that kendo further process my data because it is already processed on server side.

I hope I convey my question.

Thanks in advance

1 Answer, 1 is accepted

Sort by
0
Accepted
Nick
Top achievements
Rank 1
answered on 22 Oct 2012, 08:54 AM
Maybe you can do something like this:
template: '#=kendo.format("{0:p}", YourValue / 100)#'
Awais
Top achievements
Rank 1
commented on 22 Oct 2012, 09:01 AM

Thanks Nick, 

Actually I don't want to further process my data as I told it is processed on server side I mean that is already in percentage. So, now I just want to put the symbol of percentage and when I go to edit I can edit that as a number. 
Awais
Top achievements
Rank 1
commented on 22 Oct 2012, 09:18 AM

It works thanks for the help :)
Medhanth
Top achievements
Rank 1
Veteran
commented on 23 Apr 2020, 02:48 PM

for above one if value is 85 it is display as 85.00%.. expected out is 85% .. 

 

Just i need append % symbol in kendo Grid , any ways iam getting that value from database

Tsvetomir
Telerik team
commented on 28 Apr 2020, 01:19 PM

Hi,

Indeed, the default number of decimals is two. In the format, explicitly specify the number of decimals. Or, alternatively, directly append a "%" to the value of the field:

template:"#=kendo.format('{0:p0}', val/100)#"
template:"#=val#%"

 

Regards,
Tsvetomir
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
Grid
Asked by
Awais
Top achievements
Rank 1
Answers by
Nick
Top achievements
Rank 1
Share this question
or