I have two Kendo UI ListViews. I am able to get the list of available options to load and display values. I am also able to get the drag functionality to work. The issue is the drop functionality of the destination. I can get the second ListView to register as a dropTarget, but I cannot determine how to add the draggable to the destination ListView.
Here is the relevant code:
var groupDataSource = getReadGroupsDataSourceFor(2819);
try {
var readgroups = $("#availableReadGroups").kendoListView({
selectable: "single",
navigatable: false,
template: "#if(!IsSelectedGroup) {# <div style='font-size:13px;padding-left:5px;padding-top:5px;'>${GroupName}</div>#} else {# <div class=\"k-state-selected\" style=\"font-size:13px;padding-left:5px;padding-top:5px;\" aria-selected=\"true\">${GroupName}</div> #}#",
dataSource: groupDataSource
});
var selectedGroups = $("#selectedGroupsValues").kendoListView({
selectable: "single",
navigatable: false,
template: "#if(!IsSelectedGroup) {# <div style='font-size:13px;padding-left:5px;padding-top:5px;'>${GroupName}</div>#} else {# <div class=\"k-state-selected\" style=\"font-size:13px;padding-left:5px;padding-top:5px;\" aria-selected=\"true\">${GroupName}</div> #}#",
});
readgroups.kendoDraggable({
filter: "div[role=option]",
hint: function (row) {
return row.clone();
}
});
selectedGroups.kendoDropTarget({
drop: function (e) {
var lvObject= selectedGroups.data();
lvObject.kendoListView.dataSource.add(e.draggable);
}
});
} catch (err) {
alert(err);
}