Mr. T.
Mr. T.

Reputation: 1345

How to find the parent of an ASP.NET TreeView node in JavaScript?

How to find the parent of an ASP.NET TreeView node in JavaScript?

Upvotes: 1

Views: 1842

Answers (1)

SLaks
SLaks

Reputation: 888185

You need to get the element's ClientID, then call getElementById and check the parentNode, like this: (In a <script> block on the page)

document.getElementById('<%=myTreeView.ClientID%>').parentNode

Upvotes: 2

Related Questions