Hi,
I am converting my UltraWebTree to WebDataTree. I have the following methods that i use in UltraWebTree that is not present in WebDataTree.
1) GetIdString()
- I am building my tree using the dataset from an SP. Previously, in UltraWebTree using "View Source" i am able to notice that for every tree node there is an ID that is automatically generated like.. _2_1_2 etc.. I noticed that in WebDataTree, this is not happening. My code is heavily dependent on this method. Is there an alternate solution for this Method?
2) GetNodeFromId(string)
- What is the equivalent method in WebDataTree?
3) UltraWebTree1.SelectedNode
- I have a grid that shows the Orders that a customer has and also what was the recent activity done in that order. If they click on the recent activity, i will open a new tab and in the treeview i want to highlight the node. I will be doing it in server side. How to achieve it?
Thanks,
Raja
Hello Raja,
Thank you for posting in our forum.
Regarding 1) And 2) You can use the address attribute of the nodes to get the node by it. This is explained in more details here:
http://forums.infragistics.com/forums/p/54689/283257.aspx#283257
Basically to get the address of a node you can use: node.get_element().getAttribute("adr");
And then to find the same node by that address: tree.getNode(nodeAddress);
3) Do you need to set the node to be selected on the server side?
You can get/set the selected node on the server side in the following way:
To get the currently selected nodes : WebDataTree1.SelectedNodes
To set the selected nodes: WebDataTree1.SelectedNodes.Add(node) or WebDataTree1.SelectedNodes.AddRange(collectionOfNodes).
You may also need to clear the previous selected ones with: WebDataTree1.SelectedNodes.Clear()
Let me know if you have any further questions or concerns.
Best Regards,
Maya Kirova
Developer Support Engineer
Infragistics, Inc.
http://ko.infragistics.com/support
Hi Maya,
Thanks for the reply. I am able to set the selected node in server side. I have another question, is it possible to get the address of the node in server side?