W
William Sullivan
Anybody figure this out? I can't figure out how to get the node's client
side control ID in order to grab aholt of it. I've seen a post that says
that the node's ID is: TreeView.ID + (index of the TreeNode in
TreeView.Nodes collection). The problem is that, even after a postback, you
can't get the index of the treenode in the collection. You'd think that this
would work:
(after SelectedNodeChanged postback)
TreeView.Nodes.IndexOf(TreeView.SelectedNode)
--or--
(when you have the ValuePath)
TreeView.Nodes.IndexOf(TreeView.FindNode(ValuePath))
Both of which return -1 for the node index. So what's the solution?
side control ID in order to grab aholt of it. I've seen a post that says
that the node's ID is: TreeView.ID + (index of the TreeNode in
TreeView.Nodes collection). The problem is that, even after a postback, you
can't get the index of the treenode in the collection. You'd think that this
would work:
(after SelectedNodeChanged postback)
TreeView.Nodes.IndexOf(TreeView.SelectedNode)
--or--
(when you have the ValuePath)
TreeView.Nodes.IndexOf(TreeView.FindNode(ValuePath))
Both of which return -1 for the node index. So what's the solution?