Disabling the group separator

5 posts, 0 answers
  1. Joey
    Joey avatar
    9 posts
    Member since:
    Nov 2012

    Posted 24 Apr 2013 Link to this post

    I'm using the MVC wrappers and I have a numeric text box that I'd really like to see without the "," group separator (e.g. 1937 should not be 1,937 as it's shown now). 

    Is there anyway to do this in the MVC wrappers?

    Thanks.

    -Joe
  2. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2595 posts

    Posted 26 Apr 2013 Link to this post

    Hi Joe,

    In order to achieve your goal you should specify the NumericTextBox's format. For example:

    @(Html.Kendo().NumericTextBox()
      //....
      .Format("n0")
    )
    More detailed information about the formats in Kendo UI is available in the corresponding documentation.  Kind regards,
    Iliana Nikolova
    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. Joey
    Joey avatar
    9 posts
    Member since:
    Nov 2012

    Posted 26 Apr 2013 Link to this post

    Iliana, thanks!

    Unfortunately, that particular format string "n0" left the group separator in the numeric text box.  I looked in the documentation but did not see a list of formats.  Do you know which is the correct format or where I can find the list of accepted formats?

    Thanks.

    -Joe Benckert
  5. Joey
    Joey avatar
    9 posts
    Member since:
    Nov 2012

    Posted 26 Apr 2013 Link to this post

    Sorry, I didn't see the list of formats that you originally posted.  I've tried several different things but the group separator persists...

    Here is my code:
    @Html.Kendo().NumericTextBoxFor(model => model.VehicleYear).Format("n0")
  6. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2595 posts

    Posted 30 Apr 2013 Link to this post

    Hi Joe,

    First of all, let me apologize - I didn't understand your requirement correctly. I believe the following format should help to achieve the desired result: 

    @(Html.Kendo().NumericTextBoxFor(model => model.VehicleYear).Format("#.##")
    //....

    Let me know if this fits your requirements.
     
    Regards,
    Iliana Nikolova
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top
Kendo UI is VS 2017 Ready