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

Method for removing controls

5 Answers 433 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Micha
Top achievements
Rank 1
Micha asked on 22 Oct 2011, 07:38 PM
I'm using jquery mobile with some controls of kendo ui (either kendo mobile isn't out yet).

Jquery Mobile use AJAX to load the content of the next page and replaces the content of the div with the attribute data-role="page". 
This is fine and works great, but with the time the page gets slower and slower. the reason for this is, that kendo ui creates elements in the body of the document, and those elements are never removed... so the page dom increases with every page load... 

Is there a reason to destroy existing controls so that they remove the generated content in the body? Or can I define in which element kendo ui will generate the hidden divs?

Thank you 
Micha

5 Answers, 1 is accepted

Sort by
0
Kamen Bundev
Telerik team
answered on 25 Oct 2011, 12:20 PM
Hi Micha,

Currently Kendo UI widgets do not have destroy methods, though we are planning to implement them. In your case (I guess you had in mind DropDownList, ComboBox or AutoComplete widgets), you will have to hunt down the dropdowns yourself and remove them from the DOM - look for #id-list wrapped in a .k-animation-container (or not if it wasn't opened at least once).

Regards,
Kamen Bundev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Igor
Top achievements
Rank 2
answered on 13 Apr 2012, 01:18 PM
Hi, Kamen!

i hunting "k-animation-container" and removing it like that:
$("#datePicker").data('kendoDatePicker').dateView.popup.wrapper.remove();

but when i trying to create  kendoDatePicker  instance next time  - it becomes frozen as it desribed here: http://www.kendoui.com/forums/ui/date-time-pickers/datepicker-becomes-static.aspx
 
Could you please point me to some workarounds on this bug?
0
Dimo
Telerik team
answered on 13 Apr 2012, 02:26 PM
Igor's discussion continues at:

http://www.kendoui.com//forums/ui/date-time-pickers/datepicker-becomes-static.aspx

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!
0
Igor
Top achievements
Rank 2
answered on 13 Apr 2012, 02:26 PM
Dimo, thanks, i know ;)
0
Chad
Top achievements
Rank 1
answered on 14 Apr 2012, 08:08 AM
Thanks for the link :)
__________________
Restaurant Business
Tags
General Discussions
Asked by
Micha
Top achievements
Rank 1
Answers by
Kamen Bundev
Telerik team
Igor
Top achievements
Rank 2
Dimo
Telerik team
Chad
Top achievements
Rank 1
Share this question
or