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

NumericTextBox reinitialization

1 Answer 820 Views
NumericTextBox
This is a migrated thread and some comments may be shown as answers.
Zixiang
Top achievements
Rank 1
Zixiang asked on 13 Nov 2017, 10:34 AM

Hi guys,

I'm trying to swap my Kendo UI widgets according to a dropdown.

Currently, I call destroy on the widget, and remove all HTML within the container div holding the <input> that was used for the kendo widget. I then append a new div into the container and call the initialization code for kendoNumericTextBox again, but came upon this error:

"Uncaught TypeError: Cannot read property '_move' of undefined".

 

I have also tried the example provided on the web, that moves the origin input out, before calling destroy on my wrapper, with the same resulting error.

 

 

 

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 15 Nov 2017, 08:13 AM
Hello, Zixiang,

Thank you for the details.

I can assume that the issue may occur as the NumericTextBox actually has two inputs an removing only one of them may lead to an issue.

I made an example where on the DropDown change event I destroy the current NumericTextBox and create a new one:

https://dojo.telerik.com/aBUVU

https://docs.telerik.com/kendo-ui/intro/widget-basics/destroy

If the issue still occurs, please provide a runnable example or modify the Dojo and I will gladly assist further.

Regards,
Stefan
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
NumericTextBox
Asked by
Zixiang
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or