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

Turn off a widget

1 Answer 53 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jonathan
Top achievements
Rank 1
Jonathan asked on 25 Apr 2012, 08:36 PM
Is there a way to turn off a widget once it has been applied?

So if I have a case like: 

$(this).kendoGrid(...)

I need to turn it off for a certain case. Is that possible?

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 27 Apr 2012, 08:19 AM
Hi Jonathan,

If I understand you correctly you are talking about a dispose mechanism, which will remove the widget from the page. Currently it is not available out-of-the-box, we may include it in the future.

What you can do now is unbind all existing event handlers from all elements of a widget and then remove it from the DOM. In some causes you may want to unwrap a widget element from its additionally added parents, e.g. as is the case with ComboBoxes and DatePickers.

Greetings,
Dimo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
General Discussions
Asked by
Jonathan
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or