Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
220
Exception in igtree_setSelectedNode(tn, nodeId) when clicked on a node in UltraWebTree
posted

Hi,

I am using UltraWebTree in an aspx page where I have a dropdown list. In the DropdownList selection_changed event I am clearing all the nodes of the UltraWebTree and the nodes are dynamically added based on the item selected in the DropDownList. When first time an Item is selected , I am able to click on any node in the tree. But when I change the selection in the dropdown( second time ) , the tree nodes are cleared and added again dynamically based on the selection which works fine, but when I click on any node it is throwing an exception, When i trace it the exception is in the function igtree_setSelectedNode(tn,nodeId).

For the very first time when tree is created with the nodes , it is working fine , I can select any node. But when I cleared all the nodes and add the nodes dynamically , if I click on any node I am getting this exception in the function igtree_setSelectedNode(tn,nodeId).

The exact line of code where it is throwing exception is shown in Bold below

if(igtree_currentNode!=null)

{

var nodeSpan;

var styleE;

if(oTree.FullNodeSelect == true)

styleE = igtree_currentNode;

else

styleE = igtree_getNodeSpan(igtree_currentNode)

styleE.tabIndex = -1;

nodeSpan = igtree_getNodeSpan(igtree_currentNode)

var image=nodeSpan.previousSibling.previousSibling;

if(image!=null && image.tagName=="IMG") {

var unselectedImage = igtree_currentNode.getAttribute("igUnselImage");

In the code behind I have the code UltraWebTree1.ClearAll() to clear the nodes, after which I create the nodes again dynamically based on the Dropdown selection. I tried with UltraWebTree1.Nodes.Clear( ) but didn't help.

Please let me know why I am getting this Exception.

Thanks & Regards

Srihari Reddy