WebDataTree1.ClientEvents.NodeCollapsed = "WebDataTree_NodeCollapsed"
WebDataTree1.ClientEvents.NodeCollapsed = "WebDataTree_NodeCollapsed";
// The client event 'NodeCollapsed' takes two parameters sender and e // sender is the object which is raising the event // e is the DataTreeNodeEventArgs function WebDataTree_NodeCollapsed(sender ,e) { //Gets the node object that is collapsed var node = e.getNode(); //Gets the text of the node var nodeText = node.get_text(); alert("Node '" + nodeText + "' collapsed!"); }