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

Numeric keypad decimal seperator

0 Answers 108 Views
Input
This is a migrated thread and some comments may be shown as answers.
Frank
Top achievements
Rank 1
Frank asked on 28 Apr 2011, 01:41 PM
Hi,

Our users want to use the decimal separator key on the numeric keypad, which is a point on the Belgian keyboard, to be used as a comma in the telerik numeric texbox. However, the numeric textbox doesn't allow this key to be used.

I understand that behaviour, as the culture is set to use a comma as separator. But, as our users pointed out it does works in Excel. This is true, Excel seems to intercept the point when entered from from the keypad and replace it with a comma.

So, in order to mimic this I tried a similar thing, with some javascript attached to the onkeydown event of the numeric textboxes:
 

 

function replaceSeparator(e, numerictextbox) {
    if (e.keyCode == 110) {
        numerictextbox.value = numerictextbox.value + ",";  
        return false;  
    }
}

This works, the point from the keypad is replaced with a comma. However you still see the warning triangle flashing inside the textbox. Any way I can get that triangle warning out? Or perhaps there's a better way to get the numeric textbox to play nice?

Thanks,
Frank.



 

No answers yet. Maybe you can help?

Tags
Input
Asked by
Frank
Top achievements
Rank 1
Share this question
or