ASP.Net Treeview - Client side event handling (jQuery??)
- by The Great Gonzo
I have a Treeview (bog standard ASP.Net Treeview) that is bound to an Xml source which allows the user to navigate to various parts of our system. Nothing special....
However, I wanted to generate a breadcrumb for use in the main content area on the client side when the user clicks a node in the Treeview control. I know there are mechanisms available for breadcrumb generation (such as site maps) but for various reasons I need to do it when a node is clicked.
So far hooking up a click event using the document ready function available as part of jQuery is easy. However, having spent sometime looking I can not see how I navigate back up the tree nodes to get to each parent nodes text value to build the breadcrumb. I have been playing with .parent(), .parents() and .closest() available via jQuery but don't seem to be getting anywhere.
Has anyone done anything like this or can anyone provide a better method?
Thanks in advance....