|
Rank: Member Groups: Member
Joined: 9/1/2010 Posts: 28
|
trying to disable a menu item. using a site.master.
*** this works ****
EO.Web.Menu control = (EO.Web.Menu)Page.Master.FindControl("menu1"); control.Items[2].Visible = false;
*** this gets an error ***
control.FindItem("File/Categories").Visible = false;
here is some of the HTML from the menu.
<eo:Menu ID="Menu1" runat="server" ControlSkinID="MSDN" Width="360px"> <TopGroup Style-CssText="background-color:#cccccc;border-bottom-color:#cc0000;border-bottom-style:solid;border-bottom-width:1px;border-left-color:#cc0000;border-left-style:solid;border-left-width:1px;border-right-color:#cc0000;border-right-style:solid;border-right-width:1px;border-top-color:#cc0000;border-top-style:solid;border-top-width:1px;color:#000066;"> <Items> <eo:MenuItem Text-Html="Home" NavigateUrl="~/control.aspx"> </eo:MenuItem> <eo:MenuItem AllowRoles="" NavigateUrl="" Text-Html="File" ToolTip="Maintenance"> <SubMenu> <Items> <eo:MenuItem NavigateUrl="~/global.aspx" Text-Html="Global Parameters"> </eo:MenuItem> <eo:MenuItem NavigateUrl="~/workgroup.aspx" Text-Html="Workgroups"> </eo:MenuItem> <eo:MenuItem NavigateUrl="~/category.aspx" Text-Html="Categories"> </eo:MenuItem>
Please advise. thx
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
FindItem searches for item by item path, not item text.
Thanks
|
|
Rank: Member Groups: Member
Joined: 9/1/2010 Posts: 28
|
Thats fine. Where do I get item path?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Please check the reference for FindItem. Look for the description for the "path" argument. Follow the link and you will have everything about the item path.
Thanks
|
|