I’ve got a fairly simple treeview where the nodes are PopulateOnDemand and some of the nodes have a custom ImageUrl. When the tree is rendered, attempting to expand one of the nodes with the custom image results in the Javascript error: orgTree_tvOrgTreet1i’ is undefined.
The line of code that the error is from is a generated script block that looks like
TreeView_PopulateNode(orgTree_tvOrgTree_Data,1,orgTree_tvOrgTreen1,orgTree_tvOrgTreet1,orgTree_tvOrgTreet1i,'t','Node Text','2\\10001','f','','tf')
Is there a way to get around this?
This turns out to be a bug in the TreeView.
If the node has an ImageURL AND is PopulateOnDemand AND has a SelectAction of None, this bug occurs. Easiest fix is to set the SelectAction to Expand, allowing the user to click the text to expand the tree as well.
I finally found the answer in this forum post from 2006:
http://forums.asp.net/t/995686.aspx