Format Number

3 Answers 1126 Views
Jafeth
Top achievements
Rank 1
Jafeth asked on 19 Oct 2011, 04:42 PM
Hi, I'm a novice in Kendo. I need format a number (show only two decimal places) but i don't find in the documentation how to do this... can anyone help ????

{ field:"potencia", title:"Potencia", template: ' ????? ' }

3 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 21 Oct 2011, 07:56 AM
Hi Jafeth,

 You need to use kendo.toString as shown in this example:

{
field: "growth",
  title: "Growth",
  template: '#= kendo.toString(growth, "p") #'
}

Regards,
Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Jafeth
Top achievements
Rank 1
commented on 24 Oct 2011, 03:02 AM

Hi Atanas,

Thanks you for your help and time.

Regards,
Jafeth
Bjarke
Top achievements
Rank 1
commented on 25 Jan 2012, 10:52 AM

Where is the kendo.toString documentation located? In particular I'm interested in the formatting options - mostly related to numbers formatting like thousand separators, decimal digits count, rounding etc.
0
Randall
Top achievements
Rank 1
answered on 26 Jan 2012, 11:42 PM
I have not found any documentation, but the number formatting is located in the function formatNumber() in kendo.mobile.js.  If you also search for formatRegExp in that same file, you will get a pretty good idea of the formatting that can be used.  I just needed simple decimal digit control, and "n<num>" (e.g. "n2") worked for me.
0
clayton
Top achievements
Rank 1
answered on 17 Sep 2012, 01:51 PM
hey guys,
I find this very useful when i need somethin related to globalisation, hope it helps
http://www.kendoui.com/documentation/framework/globalization/overview.aspx

Regards,
Clayton
Marianne D
Top achievements
Rank 1
commented on 09 Nov 2012, 06:33 AM

HI clayton ,
The link you posted related to globalisation was really usefull. thanks for your link.

Regards,
Judid1969



--------------------


Asked by
Jafeth
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Randall
Top achievements
Rank 1
clayton
Top achievements
Rank 1
Share this question
or