Is there a client-side method to force a tree node to clear and then re-load (or refresh) all child nodes? I am dynamically loading a tree view and it's child nodes via AJAX. When I add a node, I call another AJAX method to add the node to my database. I would like the treeview/node to then refresh itself and automatically call the dataSource.read method for the node.
Thank you.
*** EDIT ***
I have found a solution that mostly works:
var treeView = $('#catalogTreeView').data('kendoTreeView');
var selectedNode = treeView.select();
var selectedDataItem = treeView.dataItem(selectedNode);
treeView.collapse(selectedNode);
selectedDataItem.loaded(false);
treeView.expand(selectedNode);
However, the expand does not always work and the node stays collapsed. Is this the correct way to do this, or is there a preferred method?
Thank you.
*** EDIT ***
I have found a solution that mostly works:
var treeView = $('#catalogTreeView').data('kendoTreeView');
var selectedNode = treeView.select();
var selectedDataItem = treeView.dataItem(selectedNode);
treeView.collapse(selectedNode);
selectedDataItem.loaded(false);
treeView.expand(selectedNode);
However, the expand does not always work and the node stays collapsed. Is this the correct way to do this, or is there a preferred method?