We're using numeric textboxes in a grid that allows for keyboard navigation. The problem is that the up/down arrows still increase and decrease the values in the textbox before the navigation event occurs. Is there a way to disable the default key events, or modify them?
Thanks,
Kevin
3 Answers, 1 is accepted
0
Georgi Krustev
Telerik team
answered on 13 Dec 2014, 12:22 PM
Hello Kevin,
I am afraid that is not very clear what "navigation" event occurs when value of NumericTextBox is increased/decreased. Could you elaborate more on this requirement?
In general, widget's keyboard navigation is enabled by default and cannot be prevented nor modified. If you need to change widget behavior, then you will need to override its current implementation.
Best regards,
Georgi Krustev
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
To elaborate, we've designed a grid so that when the user presses the arrow keys it shifts focus to the control in that direction. So the up arrow key moves the focus to the element in the row above, and down arrow sets the focus on the element in the row below.
This is working but it's also increasing or decreasing the value in the NumericTextBox at the same time. I was hoping to find out how to disable this increment/decrement behaviour on keypress.
Thanks,
Kevin
0
Accepted
Georgi Krustev
Telerik team
answered on 17 Dec 2014, 08:38 AM
Hello Kevin,
The only way to disable the increment/decrement behavior is to unbind current "keydown" event handler. Here is a Dojo demo that demonstrates one possible implementation.
Regards,
Georgi Krustev
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.