ASP.Net Treeview - Client side event handling (jQuery??)

Posted by The Great Gonzo on Stack Overflow See other posts from Stack Overflow or by The Great Gonzo
Published on 2010-05-11T20:01:32Z Indexed on 2010/05/11 20:04 UTC
Read the original article Hit count: 233

Filed under:
|

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....

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about jQuery