| | |
TreeView Web Control
Please support our ASP.NET advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
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
Views: 1135 | Replies: 2
| Thread Tools | Search this Thread |
Tag cloud for ASP.NET
.net 2.0 3.5 activexcontrol advice ajax anathor asp asp.net bc30451 bottomasp.net browser businesslogiclayer button c# c#gridviewcolumn checkbox child click commonfunctions compatible confirmationcodegeneration content contenttype courier css database datagrid datagridview datagridviewcheckbox datalist deadlock development dgv dropdown dropdownmenu edit expose feedback flash flv folder form formatdecimal forms formview google grid gridview homeedition hosting identity iframe iis index javascript jquery list menu migration mono mssql multistepregistration nameisnotdeclared object objects order problem ratings refer rotatepage save search security serializesmo.table session silverlight smartcard sql sqlserver2005 suse textbox tracking typeof unauthorized update validation vb vb.net video view virtualdirectory vista visual-studio visualstudio web webarchitecture webdevelopemnt xml youareanotmemberofthedebuggerusers





