I have 2 dopdowntree's with checkboxes on my page. They are basically cascading, depending on what they choose in #1 it will fill the 2nd one with specific options.
When the user clears all selections from the 1st one I want to clear out everything in the 2nd and reload its data with the default options.
All I'm doing in my code when they clear everything from #1 is this
var secondDDT = $("#ddt2").data("kendoDropDownTree");
secondDDT.dataSource.read();
secondDDT.value([]);
What happens is that it does indeed reload the data in #2, and if I open the dropdowntree, there is nothing checked in the control, so it has cleared the checked items. The issue is that the items are still showing up in the multiselect view of the control (see attached)
Additionally, the items that are still displaying in the multiselect view of the control are now 'frozen', you cannot manually delete them from the dropdowntree with the little 'x'. When you look at the html you can see how all the nodes have unselectable="on". Also you can see the select tag witht eh options in it. I tried clearing that manually in script but it made no different. What's going on here and how do I fix it?
<
div
class
=
"k-multiselect-wrap k-floatwrap"
unselectable
=
"on"
>
<
ul
role
=
"listbox"
unselectable
=
"on"
data-template
=
"tagTemplate"
data-bind
=
"source: tags"
class
=
"k-reset"
id
=
"3c0fe359-03e8-467f-b301-838dd5d7cd37_tagList"
data-stop
=
"true"
>
<
li
class
=
"k-button "
unselectable
=
"on"
role
=
"option"
>
<
span
unselectable
=
"on"
>DummyItem1</
span
>
<
span
title
=
"delete"
aria-label
=
"delete"
class
=
"k-select"
>
<
span
class
=
"k-icon k-i-close"
></
span
>
</
span
>
</
li
>
<
li
class
=
"k-button "
unselectable
=
"on"
role
=
"option"
>
<
span
unselectable
=
"on"
>DummyItem3</
span
>
<
span
title
=
"delete"
aria-label
=
"delete"
class
=
"k-select"
>
<
span
class
=
"k-icon k-i-close"
></
span
>
</
span
>
</
li
>
<
li
class
=
"k-button "
unselectable
=
"on"
role
=
"option"
>
<
span
unselectable
=
"on"
>DummyItem5</
span
>
<
span
title
=
"delete"
aria-label
=
"delete"
class
=
"k-select"
>
<
span
class
=
"k-icon k-i-close"
></
span
>
</
span
>
</
li
>
</
ul
>
<
span
unselectable
=
"on"
class
=
"k-input k-readonly"
style
=
"display: none;"
></
span
>
<
span
unselectable
=
"on"
class
=
"k-icon k-clear-value k-i-close k-hidden"
title
=
"clear"
role
=
"button"
tabindex
=
"-1"
></
span
>
</
div
>
<
select
id
=
"ddt2"
multiple
=
"multiple"
name
=
"ddt2"
style
=
"width: 100%; display: none;"
data-role
=
"dropdowntree"
>
<
option
value
=
"31"
selected
=
""
>DummyItem1</
option
>
<
option
value
=
"29"
selected
=
""
>DummyItem3</
option
>
<
option
value
=
"33"
selected
=
""
>DummyItem5</
option
>
</
select
>