|
Rank: Advanced Member Groups: Member
Joined: 7/3/2009 Posts: 37
|
I'm trying to add a separator between Item1 and Item2 and it won't display, I get no errors. Also I'm adding a subitem1 under Item1, is there a way to use the name identifier instead of a [0]. mnuPlans.Items[0].SubItems.Add("SubItem1"); can't you do this: mnuPlans.Items['Item1'].SubItems.Add("SubItem1")?
EO.Web.MenuItem MnuItemPlans = mnuHealthPlans.Items.Add("Item1"); EO.Web.MenuItem Separator = new EO.Web.MenuItem(); Separator.IsSeparator = true; Separator.ItemID = "_Separator"; mnuPlans.Items.Add("Item2");
//Add a Url for the MenuItem. MnuItemPlans.NavigateUrl = "~/scripts/default.asp"; mnuPlans.Items[0].SubItems.Add("SubItem1");
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
You can not use name identifier instead of item index because the names may not be unique.
Your code to create the separator is wrong. You created the separator in memory, but you did not add it to the menu.
Thanks
|
|
Rank: Advanced Member Groups: Member
Joined: 7/3/2009 Posts: 37
|
Can you please show me the correct way to add a separator between the two items via code?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Please see your private message for our replies.
Thanks
|
|