function NodeClick(treeId,nodeId) { var node = igtree_getNodeById(nodeId); if(node == null) return; var nodename=node.getText(); }
so now,I want to get the value,I want to get the help!!!Thanks!
have u assign your ClientSideScript?
<ignav:UltraWebTree ID="tree" runat="server" >
<ClientSideEvents NodeClick="NodeClick" />
</ignav:UltraWebTree>
of couse
<ignav:UltraWebTree id="UltraWebTree1" runat="server" > <Levels> <ignav:Level Index="0"></ignav:Level> <ignav:Level Index="1"></ignav:Level> <ignav:Level Index="2"></ignav:Level> </Levels> <ClientSideEvents NodeClick="NodeClick" /> </ignav:UltraWebTree>now I can get the text of the selected node,how to get the value?
Hello,
It really depends on which property in Node you are storing the value, since the Node in UltraWebTree per se does not have a value property exposed. I can recommend using the DataPath property for transfering information from server to client (other than the Text property). For example:
protected void Page_Load(object sender, EventArgs e) { Node node = new Node(); node.Text = "some node"; node.DataPath = "data path value"; UltraWebTree1.Nodes.Add(node); } <ignav:UltraWebTree ID="UltraWebTree1" runat="server"> <ClientSideEvents NodeClick="nodeClickHandler" /> </ignav:UltraWebTree> <script language="javascript"> function nodeClickHandler(treeId,nodeId) { var node = igtree_getNodeById(nodeId); if(node == null) return; var dataPath= node.getDataPath(); alert(dataPath); } </script>
For more information on what is avaialable in the CSOM of the Node object in UltraWebTree, please take a look at the following help article topic here:
http://help.infragistics.com/Help/NetAdvantage/NET/2008.2/CLR2.0/html/WebTree_Node_Object_CSOM.html