Do not show decimals when no decimals are wanted

9 posts, 0 answers
  1. Jacob
    Jacob avatar
    3 posts
    Member since:
    Oct 2011

    Posted 12 Dec 2011 Link to this post


    I do not want to show decimals. But by default my numerictextbox always shows decimals, when not active! How can i remove those decimals? I just want to see my value without any decimals.

    Kind regards,
  2. Georgi Krustev
    Georgi Krustev avatar
    3747 posts

    Posted 13 Dec 2011 Link to this post

    Hi Jacob,

     Check this forum thread.

    Kind regards,
    Georgi Krustev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. TazDeveloper
    TazDeveloper avatar
    18 posts
    Member since:
    Feb 2010

    Posted 20 Dec 2011 Link to this post

    The other forum thread identified by Georgi talks about percentages.  I don't know if this is the correct way to do it, but to get an integer number in the box I used the following:

                format: "#",
                decimals: 0

    I had first tried the decimals: 0 without a format and it did not work.

  4. Lerovi
    Lerovi avatar
    9 posts
    Member since:
    Jan 2012

    Posted 27 Mar 2012 Link to this post

    how I can dynamically change the decimals? 
  5. Daniel
    Daniel avatar
    10 posts
    Member since:
    Jun 2011

    Posted 13 Apr 2012 Link to this post

    Just in case anybody still needs some fix to the decimal issue, here is what worked (as suggested by Telerik consultant) for  me.

    In the model schema definition...
            Hours: { type: "number" },
            Minutes: { type: "number" },

     And in the columns definition...
            {field: "Hours", title: "Hours", width: "50px", format: "{0:n0}"},
            {field: "Minutes", title: "Minutes", width: "50px", format: "{0:n0}"},
  6. Masaab
    Masaab avatar
    15 posts
    Member since:
    Nov 2013

    Posted 26 Nov 2014 in reply to Georgi Krustev Link to this post

      you can use the below code.
    Set Format to .Format("#")

    @(Html.Kendo().NumericTextBoxFor(m => m.MaximumFileCount)
  7. Joseph
    Joseph avatar
    3 posts
    Member since:
    Jun 2014

    Posted 13 Jun 2017 in reply to TazDeveloper Link to this post

    Thanks, This worked for me.
  8. Joe
    Joe avatar
    52 posts
    Member since:
    Feb 2012

    Posted 29 Dec 2018 Link to this post

    Hello -- thank you this worked for me also (.Format("#")

    Could somebody show me where this is at in the documentation?

    I wasted almost an hour trying to find this in the online documentation.

    I am using core -- but looked pretty much everywhere it felt.

  9. Viktor Tachev
    Viktor Tachev avatar
    2501 posts

    Posted 31 Dec 2018 Link to this post


    The article below described the different options that can be applied to show numeric values in a specific format:

    Viktor Tachev
    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.
Back to Top