I am using kendo dropdowntree with checkboxes enabled. I need to get the entire data item of the selected nodes when the change is triggered. Currently, I'm getting only the Value field of the selected Items. How to get the entire Item?
<script>
$("#dropdowntree").kendoDropDownTree({
dataSource: [{ text: "item1", value: 1 }, { text: "item2", value: 2 },{ text: "item3", value: 3 }],
checkboxes: true,
change: function(e) {
var value = this.value();
// Here I need the checked dataItems as full objects, instead of just values
}
});
</script>
Unfortunately it does not appear as though Kendo exposes the selected dataItems, so you will need to do it manually.
The parameter
eexposes the widget that triggered the event viae.sender. From there you can filter the widget's dataSource by the value returned bythis.value.Take a look at this example:
Fiddle: https://dojo.telerik.com/eKaFojav