Web Forms :: TreeView Menu Third Level Viewstate?
Feb 22, 2010
I am trying to make TreeView menu with three level deep. I have problems, and can't figure it out how to save TreeView position in third level, when I click it. When I click it in second level, It saves position(expanded), but when I click third level, the whole menu collapses into root level :In my example I search for selected node name, expand it with node.Expand(); .. that is for masternode, but how to expand childnodes of masternode with selectednode name? Just cant figure it out..my code:
[Code]....
View 2 Replies
Similar Messages:
Apr 5, 2010
Is there a way to add/delete/update the default classes (for instance AspNet-Menu-WithChildren,AspNet-Menu-NonLink ) of the html generated by the asp.net menu or treeview control? I am using CSSAdapters so the menu control renders in a list format instead of table format.
View 1 Replies
Jul 9, 2010
I'm trying to create an asp menu for a website. The site will have 2 levels of user Master users (which will have more options) and Sub users which will have limited menu options.
I was wonder does anyone knows if a way to hide menu items? I've tried google but I can't really find much.
Here's the Asp code
[Code]....
I have worked out how to hide the whole menu when the user is not logged in
MainMenu.Visible = false
View 1 Replies
Apr 4, 2010
If I disable ViewState at Page level, will it be remembered for GridView inside the page?
View 1 Replies
May 28, 2010
my menu control is bound to a sitemap. I would like to be able to customize the second level of the menu (the dynamic level), so that I can insert an item image, link and text. An example is the top menu in [URL]
Is it possible to achieve using asp.net menu and sitemap ? maybe using the dynamic item template of the menu ?
Here's my code so far:
[Code]....
my site map:
[Code]....
code that binds to site map:
[Code]....
View 3 Replies
May 2, 2010
I'm looking for a good jQuery or CSS, or combo, library to enance my left side menu in an an intranet application. I don't like the 'hover only' expand/collapse style of the ASP.NET Menu control on its own, and I don't like the 'icon-click only' expand/collapse style of the TreeView control on its own.
I plan on trying the CSS Control Adapters, to render the menu with some self-respect, i.e. as nested <ul> or <ol> elements instead of the usual orgy of tables. Beyond that, I need something to give a bit of style and menulike behaviour to these nested lists, and I would prefer a jQuery plugin for this. Which should I use?
View 3 Replies
Aug 22, 2010
I want to apply a css class to the level 1 menu item (parent) when it or any or it's children are selected. I've looked at MSDN documentation and any number of examples and walkthroughs but I haven't come up with a way of managing this. I was thinking something like this might work but the style is not being applied to the parent. To further complicate matters, if I try to apply a css style to StaticSelectedStyle it doesn't pick it up at all.
Menu Markup:
<StaticSelectedStyle Font-Bold="True" ForeColor="#3333CC" />
Code Behind:
protected void MenuItemClick_NavMenu(Object sender, MenuEventArgs e)
{menuItem parentItem = e.Item.Parent;
if (parentItem != null)
{
parentItem.Selected = true;
}
View 2 Replies
Nov 8, 2010
I have this control on a page. The selections are static. The "maximumlevels" is set to 6. When I click on an item at the 4th level, I can see the postback occur but the "click" event doesn't fire! I'm totally baffeled. I've tested this in the Page Load event. At this point the PRIOR menu selected value shows. On the next menu_click, the previous selection shows. The first menu item is "selected" and has a value of "Overview". The fourth level item has a value of "Child". No matter how many times I selected that item, my check in the Page Load shows the value to be "Overview". I've tested the 3rd level items and on click, I can see the prior menu item value. When I click a 4th level item, the value never changes from the last 3rd level or higher item selected.
View 7 Replies
Feb 18, 2010
Using an ASP.NET 3.5 menu control set to horizontal, is there a way to specify that only a certain node of the menu displays? For example, let's say I have a vertical menu on the left side of the master page that is tied to a sitemap and displays these nodes. The submenus would be dynamic and only display when the root node is hovered.
Main Page
Second Page
Sub Menu 1
Page 1
Page 2
Page 3
Sub Menu 2
Page 1
Page 2
Page 3
A certain (powerful) group of my users will always be going straight to the pages in Sub Menu 1 and pretty much never touching the other pages. They would like a sub-master page that is based on the parent master page so that the primary vertical menu and the sitemappath are all still there but the sub-master page will contain a horizontal menu control that only displays the the Sub Menu 1 node, like this:
Sub Menu 1 Page 1 Page 2 Page 3
Is there a way to set up the menu control to start displaying at a certain node level so the parent nodes and sibling nodes aren't displayed or would this require maintaining a separate sitemap file? I hope this makes sense.
View 1 Replies
Jan 3, 2011
I have develope a application with the help of Visual studio 2003 with sql server 2005
Its having Level2 HTML menus. In HTML page its working properly,but in aspx page its not working.How to get the drop down level 2 menu in aspx page?
View 5 Replies
Sep 24, 2010
I have role assignments on both the first and second level of my menus within my sitemap file. The first level works fine, and I only see items assigned to my role. But roles assignments seem to have no effect on the second level. It seems like if you have access to the first level, you have access to everything on the second level. Is this correct?
From my sitemap (either a SalesRep or an Administrator can see everything underneath):
<siteMapNode title="Administration" roles="SalesRep,Administrator" description="Admin" >
<siteMapNode title="CompanyMaintenance" roles="SalesRep" url="~/Admin/CompanyManagement.aspx" />
<siteMapNode title="Initialize Roles" roles="Administrator" url="~/Admin/Roles.aspx"/>
</siteMapNode>
View 3 Replies
Oct 29, 2010
I need to create 2 level deep menu. The first level is static and horizontal. And i need the second dynamic level to be horizontal. Is there any oprion for dynamic menu item or it can be done by css somehow?
View 6 Replies
Jun 16, 2010
i have this situation: i have to build a menu with datasource from the db, because i have to filter them among the user that is loged in. i have tried building a menu using repeater, and all this works fine till i realized that i wanted the menu with more than two levels. i have also tried with treeview, but i really don't want this solution (problem with the style and the treeview doesn't have a pretty view).
View 1 Replies
May 4, 2010
I have a fairly complex web app which has two levels of master page. The top level provides a nav bar constructed from a Menu control across the top of the page. Second level master pages provide menus down the side. It all works well.
On both Menu controls, I need to handle the MenuItemClick event. This works fine on the Menu controls on the second-level master pages. However, the Menu on the top level master does not raise the event at all.
This web site makes extensive use of Ajax and the top-level master page contains the ScriptManager. Before I go to all the work of creating a much simpler test site, why the Menu control is not raising the MenuItemClick event?
Here is the markup for the Menu in the top-level master:
[Code]....
Here is the MenuItemClick event handler:
[Code]....
The logging call in the event handler never gets called. Equivalent code in the Menu on the second-level master does get called.
View 2 Replies
Jul 10, 2010
Has anyone successfully implemented a node specific context menu on a treeview in any web project?I have populated context menu on specific treenode and able to get the treenode tagname, but i am not able to select the tree node while i right click on the treenode.My code is as follows:
function ShowContextMenu() { var obj = window.event.srcElement; if(obj.tagName == "SPAN") { showhide('ctl00_menuHover','true',obj.tagName);//function to show/hide menu } }
<asp:treeview id="trvMenu" runat="server" datasourceid="SiteMapDataSource1" xmlns:asp="#unknown">
CollapseImageToolTip="Collapse" ExpandImageToolTip="Expand" ShowLines="True" oncontextmenu="Javascript:ShowContextMenu();return false;">
View 2 Replies
Feb 10, 2010
I want to create a three level menu, I have got a recursive function today that works with three levels. But the thing is how do i output the third lever? Using two repeaters i have managed to get a hold of the first two levels through the ChildNodes property. But that only gives me the second level. What if a want the third level? Example code below. How do i get the third level? :)
<asp:Repeater ID="FirstLevel" DataSourceID="SiteMapDataSource" runat="server" EnableViewState="false">
<ItemTemplate>
<li class="top">
<a href='/About/<%#Eval("Title")%>.aspx' class="top_link"><span class="down"><%#Eval("Title")%></span><!--[if gte IE 7]><!--></a><!--<![endif]-->
<asp:Repeater runat="server" ID="SecondLevel" DataSource='<%#((SiteMapNode)Container.DataItem).ChildNodes%>'>
<HeaderTemplate><!--[if lte IE 6]><table><tr><td><![endif]--><ul class="sub"></HeaderTemplate>
<ItemTemplate>
<li>
<a href='<%#((string)Eval("Url")).Replace("~", "")%>' style="text-align: left;"><%#Eval("Title")%></a>
Third repeater here?
</li>
<ItemTemplate>
<FooterTemplate></ul><!--[if lte IE 6]></td></tr></table></a><![endif]--></FooterTemplate>
</asp:Repeater>
</li>
</ItemTemplate>
</asp:Repeater>
View 2 Replies
Nov 15, 2010
I am looking for multi-level accordion menu (drill down to few levels deeper) (expand and collapsible) for my website. Is there a sample anywhere I can use? it will be nice if I can dock it to the left by clicking on an icon and slide back when I click on the icon again.
Something like this:
menu1
menu2
menu3
menu4
menu5
menu6
menu7
menu8
View 3 Replies
Nov 9, 2010
I have a menu that looks like this:
[Code]....
Since I can search any of those categories, I'm looking for a more user-friendly way of displaying it as is without using a combobox and with no javascript. With the combobox, the deeper the menu, the more leading spaces it'll have. As seen above, that's exactly how it'd look like in a combobox.
View 6 Replies
Sep 20, 2015
how can i create treeview node at runtime by right clicking on node?
View 1 Replies
Nov 29, 2010
Im not sure why we have SiteMapProvider and SiteMapDataSource. I mean i know we can have different providers ( like XmlSiteMapProvider, SQLSiteMapProvider etc) but then why there is SiteMapDataSource added in between the Server Control and these Providers? why cant we directly assign SiteMapProvider to TreeView or Menu Control? The way it works right now Menu Control ->SiteMapDataSourve->SiteMapDataProvider
View 2 Replies
Aug 26, 2010
I am using Visual web developer 2008 Express. I have a menu with a static top level and a dynamic second level. When the dynamic level is displayed the background is always white. How do I set the background and foreground colors for the dynamic menulevel?
View 2 Replies
Dec 1, 2010
I would like to control the menu display (show/hide menu items) in my ASP.NET 3.5 website based on the user's AD group and also control the functionality within a page using user's active directory group membership. how to do this? menu is stored in an xml file and bound to a control. all the examples I see on the web are related to forms authentication. this is an intranet website with integrated windows authentication and both authentication and authorization should be controlled using user's active directory groups.
View 1 Replies
Mar 2, 2011
Below are an XML file, as the DataSource, and an aspx code with the TreeView and Menu controls.
Why the TreeView and Menu controls can not display the "1999" and "2000" for the <StarWars>
tag and <JurassicPark> tag?
XML file
<movies>
<Adventure
>
<StarWars>1999</StarWars>
<JurassicPark>2000</JurassicPark>
<IndependenceDay/></Adventure
>
<Animation
>
<IceAge/><Shrek/></Animation>
<Drama>
<Titanic/><Ghost/><ForrestGump/></Drama>
<Horrer>
<Jawa/><TheRing/></Horrer><movies>
aspx
code
<asp:TreeView
id="CheckBoxList1"
DataSourceId="srcMovies"
Runat="server"
/>
<asp:Menu
id="BulletedList1"
DataSourceId="srcMovies"
Runat="server"
/>
View 1 Replies
Jan 28, 2011
I soved my first problem (Can image as top menu by using sitemap ?) Now I hope Expand/collpse images of tree view on the top of my main menu's image. Do I have anyway to do so?
View 1 Replies
Mar 22, 2011
i am creating a software., in that i want to form menu in treeview structure.the parent node, child node and sub child node location are stored in database table SQL 2005..using coding i have to display the treeview menu structure to the screen when the page loads and that too without any flickering on page load...i need in javascript or C#
View 2 Replies