Hi,
Infragistics version 2008.1
I have an UltraWebTree and an UltraWebMenu as a popup on a page. On the NodeClick (Clientside) even of the tree node, I popup the web menu that has a few items like "Add", "Delete" etc. When I choose, for example, "Delete" from the popup menu, my MenuClick (Client event) fires. But how do I get a reference to the currently clicked tree node from this client function so that I can delete the clicked node. A sample code is highly appreciated.
Babu.
HI,
You can get the node using our utility function
Here is a code snippet:
function UltraWebTree1_NodeClick(treeId, nodeId, button){ //Add code to handle your event here. var node = igtree_getNodeById(nodeId); alert(node.Id);}
Here is a help link to our Csom:
http://help.infragistics.com/Help/NetAdvantage/NET/2008.3/CLR2.0/html/WebTree_CSOM_Overview.html
Thanks for the reply. But my original question is not about getting a reference to the node in the NodeClick event of the tree. But getting the NodeId from within the UltraWebMenu's ItemClick event. Because this WebMenu is attached as a Popup for the NodeClick for the tree.
Here is the code for NodeClick of the Tree:
function igTax_NodeClick(treeId, nodeId, button) {
if (button == 2) {
igmenu_showMenu(mid, tree.event);
return true;
And here is the Click event function for the menu
// I want to remove the Tree Node here;
document.body.style.backgroundColor = tag;
;
ok you should get the selected node.
wire up the webtree's clientside Intialization event and store the treeid in a global javascript variable.
here is a code snippet:
var treeid = null;function UltraWebTree1_InitializeTree(treeId){ //Add code to handle your event here. treeid = treeId;}
In your menu client-side precessing - use this code to get the tree and selected node
here is the code snippet:
var tree = igtree_getTreeById(treeid) var snode = tree.getSelectedNode(); alert(snode.Id);