This is a migrated thread and some comments may be shown as answers.

[Solved] Allow Thousands Separator on Entry

2 Answers 23 Views
NumericTextBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Adam
Top achievements
Rank 1
Adam asked on 06 Jul 2011, 09:27 PM
Is there a way to easily enable the Numeric and Currency text boxes to allow the thousands separator to be entered when typing in the field?  By default it only allows digits and the decimal separator but not the thousands separator.  It works fine when pasting in a value with the separators but not when typing and our application has a requirement to allow the user to enter in the separator while typing.  I just wanted to know before I go and work with the javascript to support it.

2 Answers, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 07 Jul 2011, 09:34 AM
Hello Adam,

As you emphasize, typing thousand separators is not allowed by design. In general you will need to override keydown and keypress event handlers and implement the required behavior by yourself. This will not be an easy task. Give it a try and let me know I can be of a further help.

Kind regards,
Georgi Krustev
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Adam
Top achievements
Rank 1
answered on 07 Jul 2011, 12:57 PM
That is what I figured.  Thanks for the information.  I was able to implement some minor changes to the _keydown, _keypress and _value functions to add the support for it.  Too bad this isn't just a setting that can be set on the control.
Tags
NumericTextBox
Asked by
Adam
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Adam
Top achievements
Rank 1
Share this question
or