Welcome Guest Search | Active Topics | Sign In | Register

BaseMenu, trouble adding item in code behind Options
Joel Rewers
Posted: Tuesday, December 18, 2007 12:59:29 AM
Rank: Newbie
Groups: Member

Joined: 12/18/2007
Posts: 3
Hi there,

I'm using the BaseMenu on my page and in my code behind I try to add MenuItems to it.

basically it looks like this

Code: C#
AspxLab.WebControls.MenuItem menuItem = new AspxLab.WebControls.MenuItem();
menuItem.LookID = cmsMenuItem.LookID;
menuItem.ItemID = cmsMenuItem.ItemID;

GetAspxLabMenu().MenuItems.Add(menuItem);


Now the problem is that the menu is not displayed on the page. Do I have to do something before the menu is shown on the page or am I forgetting something?

One other question. Is there a way to bind to a generic list (ie: List<Employee>) that has childitems of its own? Each Employee in my List<Employee> could have a list of employee (List<Employee>), but when I try to bind that to my menu, only the first employees are shown on the page.


any ideas ?


thanks
eo_support
Posted: Tuesday, December 18, 2007 5:29:09 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Hi,

The only thing I can spot is that you did not provide any text for the menu item.

You can not create a hierarchical menu from a generic list. You will need to use other ways described in the document to bind to a hierarchical data source.

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.