NumericTextBox with free decimals

1 Answer 66 Views
NumericTextBox
Giovanni
Top achievements
Rank 1
Iron
Iron
Iron
Giovanni asked on 11 Jul 2022, 03:18 PM

Hi, is it possible to use a kendo UI NumericTextBox with free decimals?

I would like to allow the user to input 0, 1 or any number of decimals and I want to see all in the textbox.

Is it possible?

1 Answer, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 13 Jul 2022, 10:24 AM

Hello, Giovanni,

Thank you for reaching out to us!

If I understand your question correctly, you want the users to be able to input as many numbers as they want after the decimal sign. Is that correct?

In order to achieve this, the format and decimals configurations can be implemented for the NumericTextBox. You can take a look at the Custom Number formats documentation to see how you can display one or more digits after the decimal point.

Dojo

For your convenience, below you can find a Dojo link to a working version of the desired formatting and a detailed explanation of the implementation.

Untitled | Kendo UI Dojo (telerik.com).

Explanation

First Step: Choose an arbitrary number to represent the desired amount of digits after the decimal sign: 

 

Second Step: With the help of the "#" digit placeholder (reference the Custom Number Formats page), achieve the desired format for the displayed number: 

Third Step: Configure the format and decimals functions:

Let me know if this works for you and if you have any further questions.

Regards, Georgi Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
NumericTextBox
Asked by
Giovanni
Top achievements
Rank 1
Iron
Iron
Iron
Answers by
Georgi
Telerik team
Share this question
or