Last post Oct 01, 2007 06:11 AM by jkey
Sep 27, 2007 02:03 PM|jkey|LINK
I have a weird problem with the menu control, and I am not sure what is causing it. I'm using the css friendly adapters, which I suspect might be the cause.
I populate the control dynamically in code along the lines of:
I am adding child controls in the same fashion using ChildItems.Add
I have an admin menu hierarchy containing pages in 2 levels that I would like to attach to the first menu item (Home) whenever the Admin logs on. This structure is created in the same way as above. However, when I add the menu items and try to add the top
item to the first MainNav.Items(0).ChildItems.AddAt(0, AdminMenu), I end up with all the sublevels (under Home>Admin) being static: the 2 first levels, i,e. Home & Admin + SubLevel 1 are dynamic, while bottom level sub menus are displayed when the parent is.
That is of course problematic, as the last level items are displayed on top of each other.
Adding the same hierarchy to the top level (MainNav.Items.AddAt(0, AdminMenu) does not cause this problem. It is only when a fourth level is added that the menu goes weird.
Has anyone experienced a similar problem, or am I missing something here?
menu css friendly adapters
Oct 01, 2007 05:08 AM|jkey|LINK
Let me add that changing
has no effect whatsoever.
Am I really the only one who has this problem, and are there no one who can help shed some light here?
Oct 01, 2007 06:11 AM|jkey|LINK
Ok, I found that this issue has been addressed previously by Rassetti:
http://forums.asp.net/t/1140208.aspx. I added the css, and the control works as expected.
- The hours spent on absolutely nothing! Sometimes I wish one could send the bill to Ms...
A rather odd implementation of a server control, I think.