How to get Client ID of a TreeNode in a Treeview?

  • Thread starter Thread starter Magnusb
  • Start date Start date
M

Magnusb

I need to be able to get the id of a node in a treeview in a client
script. When the user expand a node I want to run a script (ie innjetc a
client side script from server side) which will scroll to that node.

Don't know how to get the client side ID of a tree node since there is
no ClientID for tree node objects.
 
Hi. I found on my Treeview that if you expand all nodes on the treeview,
you'll find that the nodes (the <a> tags at least) are called
TreeViewIdtX
where X is the index. The index for the first node is 0, then 1, 2, etc. So
if you have a TreeView called Vehicles:

Cars
Fords
Taurus
Focus
Chevys
Corvette

The node for Focus will be Vehiclest3 and the node for Chevys will be
Vehiclet4 etc etc.

HTH,
Justin Dutoit.
 
Hi. I found on my Treeview that if you expand all nodes on the treeview,
you'll find that the nodes (the <a> tags at least) are called
TreeViewIdtX
where X is the index. The index for the first node is 0, then 1, 2, etc. So

Yes, I found that later as well. But thank you for replying anyway. Was
hoping I was missing something and there was an easier method (like some
simple way to get the client ID). But both and you have come to the same
conclusion so I guess this should work. I have seen som other
suggestions but they were more complicated to do.

Thanks
 
Back
Top