How do we go about getting the checked items when we submit a form containing the DropDownTree? Specifically, I'd like to get a list of checked Id values from the TreeViewItemModel.
Thanks
1 Answer, 1 is accepted
0
Plamen
Telerik team
answered on 12 Jul 2018, 11:32 AM
Hi,
The HTML <form> element would submit to the server the values of the <input> elements it contains. In the scenario when we have multiple checked items passing getting them from a value of an input in not quite flexible so in such case we would rather recommend use and ajax post request and pass the desired information in the data. Here is sample code that worked at my side:
<script>
$("#btnSave").on("click", function (e) {
var dropdowntree= $('#dropdowntree').data('kendoDropDownTree');
var dDTreeItems = JSON.parse(JSON.stringify(dropdowntree.value()));