Hello,
I have a TreeView, wich loads node on demand server side from my database
The treeview is sourrounded by a RadAjaxPanel to avoid visible postbacks
I have added a ContextMenu wich works perfectly
I whould like to add a function to the context menu
When i click that menu voice, i whould like to force the node to collapse, and expand to reload his childs, like when i clicked it for the first time, or at least to collapse it, clear his old nodes and let te user to click again
Actually i am using this function
But the expand() does not cause the load on demand of the childs, and also clicking the node does not cause the load on demand
There is a way to solve this?
Thanks
I have a TreeView, wich loads node on demand server side from my database
The treeview is sourrounded by a RadAjaxPanel to avoid visible postbacks
I have added a ContextMenu wich works perfectly
I whould like to add a function to the context menu
When i click that menu voice, i whould like to force the node to collapse, and expand to reload his childs, like when i clicked it for the first time, or at least to collapse it, clear his old nodes and let te user to click again
Actually i am using this function
function ContextMenuClick(sender, args) { |
var menuItem = args.get_menuItem(); |
var treeNode = args.get_node(); |
var tree = $find("<%= TreePagine.ClientID %>"); |
if (menuItem.get_text() == "Update") { |
treeNode.collapse(); |
tree.trackChanges(); |
treeNode.get_nodes().clear(); |
tree.commitChanges(); |
treeNode.expand(); |
} |
} |
But the expand() does not cause the load on demand of the childs, and also clicking the node does not cause the load on demand
There is a way to solve this?
Thanks