Wednesday, August 19, 2009

Expand a child node in a treeview that is in a master page from a content page

Expand a child node in a treeview that is in a master page from a content page

need to expand one of the nodes in my treeview from a content page.
Everything I have tried has not worked. The Treeview is located in a
Master Page and built from a web.sitemap. I have a content page that
is not listed in the sitemap, but I still need to expand the node.
Please provide the solution in VB.

I have been able to expand by depth by using the following.

Dim MasterTree As TreeView
MasterTree = DirectCast(Master.FindControl("TreeView1"), TreeView)
MasterTree.ExpandDepth = 0
What I need to do is to pick a child node and expand it from the
content page. (the administration node)

Thank you in advance for your assistance. Below is my Sitemap


http://schemas.microsoft.com/AspNet/SiteMap-File-1.0"

url="Default.aspx">

url="ItemsForBid.aspx" securityLevel="">

securityLevel="200">

securityLevel="500">


description="Administration" url="" securityLevel="900">
url="Admin/SecuritySearchNew.aspx" />
url="Admin/SecuritySearchExist.aspx" />


url="Admin/UpdateItems.aspx" />

url="ContactUs.aspx" securityLevel="">


need to expand one of the nodes in my treeview from a content page.
Everything I have tried has not worked. The Treeview is located in a
Master Page and built from a web.sitemap. I have a content page that
is not listed in the sitemap, but I still need to expand the node.
Please provide the solution in VB.

I have been able to expand by depth by using the following.

Dim MasterTree As TreeView
MasterTree = DirectCast(Master.FindControl("TreeView1"), TreeView)
MasterTree.ExpandDepth = 0
What I need to do is to pick a child node and expand it from the
content page. (the administration node)

Thank you in advance for your assistance. Below is my Sitemap


http://schemas.microsoft.com/AspNet/SiteMap-File-1.0"


url="Default.aspx">

url="ItemsForBid.aspx" securityLevel="">

securityLevel="200">


securityLevel="500">



description="Administration" url="" securityLevel="900">
url="Admin/SecuritySearchNew.aspx" />
url="Admin/SecuritySearchExist.aspx" />


url="Admin/UpdateItems.aspx" />

url="ContactUs.aspx" securityLevel="">




View Full Details...............................

No comments:

Post a Comment