Hi ,
i m using WebDataTree to display menu like below
+ First Node
+first childNode
+ Second Node
+Second childNode
+ Third Node
+Third childNode
from above webdataTree menu how to set "+ First Node" as selected(default selected) when page loads.
thanks
ravi
Hello Ravi,
In order to select/deselect a node client side, you could get a desired node like
var tree = $find("WebDataTree1");
var node = tree.getNode(0);
and use node.set_selected(true) and node.set_selected(false).
However, if the requirement is to fire the client and server side events of this selection, I suggest calling the _selectNode with the click browser event.
tree._selectNode(node, true, "click");
I am attaching a sample for your reference. In my application I am handling Initialize client side event of the WebDataTree. In this event I am selecting the first node as the requirement is. In this scenario SelectionChanging , SelectionChanged client side events as well as Selection changed server side events are fired.
In order to conditionally select a node Server side, you could reference to the following forum thread:
http://ko.infragistics.com/community/forums/t/48590.aspx
Please let me know how my suggestions work for you!