Change width of a kendo numerictextbox at runtime-Collection of common programming errors
Hello I’m using Kendo UI numerictextbox. I need to change the width of a numerictextbox at runtine, according to external conditions.After invoking kendoNumericTextBox, for some events in the javascript I would like to change the width of the input part of k-numerictextbox. I’m not able to get it right.
As I understand Kendo uses two inputs: one for displaying the value (with readonly attribute) and the other for editing and the editable one is identified by the id I use. I realized the hierarchy of classes created is:
class="k-widget k-numerictextbox"
class="k-numeric-wrap k-state-default k-expand-padding"
class="k-formatted-value k-numerictextbox k-input"
input = "myId" class="k-numerictextbox k-input"
So when I use $(#myid).width(newwidth);
I am not changing the width of the field, worst I get an effect of enlarging (newwidth
greater than oldwidth
) at the level of the above k-numeric-wrap
while the input part remains the same.
I hope I got it right as overview; I will appreciate any help. Thanks in advance
Marco