Welcome Guest Search | Active Topics | Sign In | Register

Deleting Menuitems - Slidemenu Options
Viren
Posted: Tuesday, November 13, 2007 12:13:11 PM
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
eo_support
Posted: Tuesday, November 13, 2007 12:29:58 PM
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
Viren
Posted: Tuesday, November 13, 2007 1:38:43 PM
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
eo_support
Posted: Tuesday, November 13, 2007 2:28:05 PM
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


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.