Not able to type in a comma

2 posts, 0 answers
  1. Bilal
    Bilal avatar
    109 posts
    Member since:
    Oct 2014

    Posted 15 Jun 2015 Link to this post

    Hi,

    I have a numeric textbox inside a Grid. I would like to allow showing a "," as a separator (thousands) and also allow decimals.

    In the OnEdit of the Grid, I have the following setup:

    1.edit: function(e) {
    2.                e.container.find("input[name^=costOperand]").kendoNumericTextBox({
    3.                    min: 1,
    4.                    max: 888888887,
    5.                    step: 100
    6.                });
    7.}

     

    With the above the numeric textbox doesn't allow me to type in a ",". Only decimals are allowed.

    Any idea?

     

    Thanks

  2. Plamen Lazarov
    Admin
    Plamen Lazarov avatar
    135 posts

    Posted 17 Jun 2015 Link to this post

    Hi,

    In general the NumericTextBox operates in two modes - display and edit. While in edit mode it allows to type in only numbers, "-" and decimals operator(which is defined by the current culture). Once the widget is in display mode(on blur) it will format the entry based on the culture and format configuration.  

    Please refer to this example. If 10000 is entered and the current culture is "en-US" the number will be displayed as 10,000.00

     

    Regards,
    Plamen Lazarov
    Telerik
     
    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
Back to Top