I wanted to destroy and recreate multiselect widget from Telerik's Kendo UI. Normally it is easy thing which I done much times before, but never with multiselect. The problem I am facing now is that way which should work (atleast I think it should) ... does not.
Here is code which I am using to destroy and recreate components like grids or dropdowns:
if ($('#dropdown1').data('kendoDropDownList')) {
$('#dropdown1').data('kendoDropDownList').destroy();
$('#dropdown1').html('');
}
How i said - If I use it on dropdown or grid - it works. But on the multiselect it does not:
if ($('#multiselect1').data('kendoMultiSelect')) {
$('#multiselect1').data('kendoMultiSelect').destroy();
$('#multiselect1').html('');
}
I prepared small Dojo example where is shown the behaviour. When dropdown is destroyed and recreated it looks correct. When I do the same to Multiselect it always add widget as next line.
Of course I can overcome this problem by changing dataSource and just call read method or something like that but I whould like to know if it is bug or there is another way how to destroy multiselects.
Thanks.