Format Number

7 posts, 0 answers
  1. Jafeth
    Jafeth avatar
    2 posts
    Member since:
    Oct 2011

    Posted 19 Oct 2011 Link to this post

    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: ' ????? ' }
  2. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 21 Oct 2011 Link to this post

    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!
  3. Kendo UI is VS 2017 Ready
  4. Jafeth
    Jafeth avatar
    2 posts
    Member since:
    Oct 2011

    Posted 23 Oct 2011 Link to this post

    Hi Atanas,

    Thanks you for your help and time.

    Regards,
    Jafeth
  5. Bjarke
    Bjarke avatar
    16 posts
    Member since:
    Dec 2011

    Posted 25 Jan 2012 Link to this post

    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.
  6. Randall
    Randall avatar
    4 posts
    Member since:
    Apr 2011

    Posted 26 Jan 2012 Link to this post

    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.
  7. clayton
    clayton avatar
    2 posts
    Member since:
    Jun 2008

    Posted 17 Sep 2012 Link to this post

    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
  8. Marianne D
    Marianne D avatar
    1 posts
    Member since:
    Nov 2012

    Posted 09 Nov 2012 Link to this post

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

    Regards,
    Judid1969



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


Back to Top
Kendo UI is VS 2017 Ready