| | |
TreeView Web Control
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jan 2008
Posts: 7
Reputation:
Solved Threads: 0
Hi,
I have a treeview control with a sitemap datasource which I use for a menu on a masterpage. All works fine, but I would like to:
1. Have all items collapsed at startup
2. Only expand the node selected and not all nodes when user click on a node
3. Be able to expand the node when click on the description as well as on the image.
Did I miss a few properties?
Please help.
Thanx
I have a treeview control with a sitemap datasource which I use for a menu on a masterpage. All works fine, but I would like to:
1. Have all items collapsed at startup
2. Only expand the node selected and not all nodes when user click on a node
3. Be able to expand the node when click on the description as well as on the image.
Did I miss a few properties?
Please help.
Thanx
•
•
Join Date: Jan 2008
Posts: 7
Reputation:
Solved Threads: 0
I found the following:
If you set the ExpandDepth = 0 all nodes are collapsed at startup, but then for every click all nodes are collapsed again. Which is better than to have the entire tree expanded on every click. (I added a sitemappath at the top of the page to show where exactly you are in the treeview). Secondly, to be able to expand a node when you click on the description added the following code:
protected void tvMenuNode_DataBound(Object sender, TreeNodeEventArgs e)
if (e.Node.NavigateUrl == "")
{
e.Node.SelectAction = TreeNodeSelectAction.Expand;
}
}
I still need to find a way to keep the selected node expanded.
If you set the ExpandDepth = 0 all nodes are collapsed at startup, but then for every click all nodes are collapsed again. Which is better than to have the entire tree expanded on every click. (I added a sitemappath at the top of the page to show where exactly you are in the treeview). Secondly, to be able to expand a node when you click on the description added the following code:
protected void tvMenuNode_DataBound(Object sender, TreeNodeEventArgs e)
if (e.Node.NavigateUrl == "")
{
e.Node.SelectAction = TreeNodeSelectAction.Expand;
}
}
I still need to find a way to keep the selected node expanded.
![]() |
Similar Threads
- How can show/view Infopath dynamic files(xml) without infopath in a computer (XML, XSLT and XPATH)
- Problem in Print Friendly Version with treeview control... (ASP.NET)
- Problem with Treeview control...... (ASP.NET)
- Xml data to treeview web control (ASP.NET)
- Tree View (ASP)
Other Threads in the ASP.NET Forum
- Previous Thread: can we pass parameter to trigger?
- Next Thread: i need help
| Thread Tools | Search this Thread |
.net 2.0 3.5 activexcontrol advice ajax appliances asp asp.net beginner bottomasp.net box browser businesslogiclayer button c# c#gridviewcolumn cac checkbox child class click compatible confirmationcodegeneration content contenttype control countryselector courier css database datagrid datagridview datalist deadlock deployment development dgv dialog dropdownmenu dynamic edit embeddingactivexcontrol feedback fileuploader fill findcontrol flash flv form forms gridview gudi homeedition hosting iframe iis javascript jquery list menu mono mssql multistepregistration nameisnotdeclared novell objects order problem ratings redirect registration relationaldatabases rotatepage search security select serializesmo.table sessionvariables silverlight smartcard sql ssl tracking treeview typeof validatedate validation vb.net virtualdirectory vista visual-studio visualstudio vs2008 web webarchitecture webdevelopment wizard xml xsl





