Hello,
I'm using a template for my tooltip, and I'd like to format the ${value} part of the template. Can you let me know how the syntax would look to format as say currency? Thanks
I'm using a template for my tooltip, and I'd like to format the ${value} part of the template. Can you let me know how the syntax would look to format as say currency? Thanks
tooltip: {
visible:
true
,
template:
"${category}<br />Claim Cost: ${value}"
}
4 Answers, 1 is accepted
0
Accepted
Hello Philip,
Petur Subev
the Telerik team
To change the display format you can use the kendo.format method.
e.g.
tooltip: {
visible: true,
template: "
#=category#<
br
/>Claim Cost: #= kendo.format('{0:C}',value) #
"
}
Petur Subev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Philip
Top achievements
Rank 1
answered on 02 Dec 2011, 07:50 PM
Thanks Petur...works great.
Is there a manual to everything that kendo.format can do, or can I compare it to a regular method such as string.format and assume it can do everything that string.format can do?
Is there a manual to everything that kendo.format can do, or can I compare it to a regular method such as string.format and assume it can do everything that string.format can do?
0
Hi Philip,
Yes kendo.format is similar to the c# string.Format method. For the moment there is no manual available.
Greetings,
Petur Subev
the Telerik team
Yes kendo.format is similar to the c# string.Format method. For the moment there is no manual available.
Petur Subev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Alex
Top achievements
Rank 1
answered on 05 Jul 2012, 08:24 PM
Is it not possible to use custom format strings? (i.e: http://msdn.microsoft.com/en-us/library/0c899ak8.aspx )
From what I've been trying out, only the standard ones (http://msdn.microsoft.com/en-us/library/dwhawy9k.aspx) work.
From what I've been trying out, only the standard ones (http://msdn.microsoft.com/en-us/library/dwhawy9k.aspx) work.