|
Rank: Member Groups: Member
Joined: 10/9/2007 Posts: 18
|
Hi,
In one of my program, I am using slidemenu control. I am binding the sitemapdatasource to the control.
There are few nodes in my sitemap file, which I don't want to display in the slidemenu control. I want to delete the menuitem either during the item bound or ?
Please help me, how I can achieve this.
Thanks, Viren
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi Viren,
The easiest way is to hide them instead of deleting them. To hide a menu item, just set the menu item's Visible property to False. Obviously you will need to find the item that you want to hide first. There are a number of ways, you would chose whichever fits your need:
1. Using index. For example, Menu1.Items[0].Visible = false; 2. Using FindItem function; 3. Using SearchItems function; 4. Using e.MenuItem inside ItemDataBound event;
Thanks
|
|
Rank: Member Groups: Member
Joined: 10/9/2007 Posts: 18
|
Thanks for your quick reply.
I tried by setting the visible property to fasle, but the problem is it displays a white band when I click the parent menuitem. I think it is because when I ckick on the menuitem and it calls its expanded property to true as it has child items(visible false) in it.
Is there any way we can resolve this?
Thanks, Viren
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Visually there shouldn't be any difference between deleting an item (or didn't have the item at the very begining) and hiding an item. So if it displays a white band when you hide an item, it would also display a white band if you do not have the item at all. Thus I am guessing it's a style setting issue. You can try to verify this by applying Windows_XP style and see if it behaves the same. If it does, then you can try to tweak your styles and see what caused it.
Thanks
|
|