Hi Darryl,
Thanks for contacting Syncfusion support.
We have analyzed your query. Currently there is no direct option to retrieve the updated details of treeview after check/uncheck the nodes in the treeview. The getTreeData() method is used to get the updated datasource of treeview after performing drag and drop, node editing, adding and removing the node. But we can achieve this requirement manually using the getNodeCount(), getNode() methods as mentioned in the following code snippet. Please refer it.
<script> $('#submit').click(function () { tree = $("#tree").data("ejTreeView"); var treeobj = []; for (i = 1; i <= tree.getNodeCount(); i++) {//getNodeCount() returns the total number of nodes treeobj.push(tree.getNode($("#" + i))); // get the details of individual node } $('#myForm').append('<input type="hidden" name="Nodedetails" value="'+treeobj+'">') }); //treeobj contains array of objects of each node </script> |
You can use getCheckedNodes() method for getting the list of checked elements.
To know more about treeview component properties, methods, and events, please refer to the below link:
http://help.syncfusion.com/js/api/ejtreeview
If you need any further assistance, kindly get back to us and we will be happy to help you.
Regards,
Francis Paul A
Hi Darryl,
Thanks for your update. If you need further assistance, please get back to us and we will be happy to help you.
Francis Paul A
Regards,