Hello,
I am trying implement controls combo between TreeView and ListBox.
The available actions are Add - from TreeView to ListBox and Remove - only remove from the ListBox.
I am using simple buttons from both actions.
The problems after call ListBox.remove(..) are two:
1) the collection listBox.dataItems() remains the same - i.e. the item is deleted only from UI
2) the underlying select HTML controls remains the same - i.e. the MVC/Kenod validators validates the page even the ListBox seems empty
Here is my remove button handler:
function removeFromListBox() { var listBox = $("#myListBox").data("kendoListBox"); var selected = listBox.select(); // this is an array listBox.remove(listBox.select()); // Does not deletes the actual data item console.log(listBox.dataItems()); // listBox.dataItems() is not reduced}