How can I hide or show menu items from Client side in ultrawebmenu?
Looks good, I'm glad it works for you. Just wanted to let you know that the "Item" type is located in the Infragistics.WebUI.UltraWebNavigator namespace, so you can use it if you import the namespace. For example:
// C#
using Infragistics.WebUI.UltraWebNavigator;
//VB.NET
imports Infragistics.WebUI.UltraWebNavigator;
Rumen Stankov"] if (!Page.IsPostBack) { Item item = UltraWebMenu1.Find("Child 1", false); item.Hidden = true; }
if (!Page.IsPostBack) { Item item = UltraWebMenu1.Find("Child 1", false); item.Hidden = true;
}
Looks good, except that there is no object type "Item". There is a "MenuItem" type, which I thought you meant but it does not work with the UltraWebMenu Find method. However, I have discovered that merely using
UltraWebMenu1.Find("Child 1", false).Hidden = true;
works just fine!
Yes, absoltely, this is perfectly possible. Imagine that you start with the following menu definition in your ASPX:
<Items> <ignav:Item Text="Top Item"> <Items> <ignav:Item Text="Sub Menu Item"> </ignav:Item> </Items> </ignav:Item> <ignav:Item Text="Top Item"> <Items> <ignav:Item Text="Child 1"> </ignav:Item> </Items> </ignav:Item> <ignav:Item Text="Top Item"> <Items> <ignav:Item Text="Sub Menu Item"> </ignav:Item> </Items> </ignav:Item> </Items>
Then, you can easily hide the item with text "Child 1" in Page_Load using the following code:
I too want to be able to make menu items visible or invisible depending of user role membership. True there is no visible property, but there is a "Hidden" property which sounds like it does the same thing. Can this "Hidden" property be set to "true" by default (on the .aspx page) and set to "false" in the code behind Page_Load event? If so, could you please provide some sample .VB code showing how to address the individual items (there is no "id=" property for each item).
It can absolutely be entered as a feature request - there's a page on our site where you can enter any feature requests you think of :
http://devcenter.infragistics.com/Protected/RequestFeature.aspx
-Tony