Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
110
Large spaces between menu items when items are added via code.
posted

Hi all, I am having some difficulty with the layout of items on NavMenu. I am adding two items in code as follows ...

protected Infragistics.WebUI.UltraWebNavigator.UltraWebMenu VerticalMenu;

 VerticalMenu.WebMenuTarget = Infragistics.WebUI.UltraWebNavigator.WebMenuTarget.VerticalMenu;

VerticalMenu.Items.Clear();
VerticalMenu.Items.Add("Item1");
VerticalMenu.Items[0].TargetUrl=Server.UrlPathEncode("Form2.aspx");
VerticalMenu.Items[0].Style.Height = 30;

VerticalMenu.Items.Add("Item2");
VerticalMenu.Items[1].TargetUrl=Server.UrlPathEncode("Form2.aspx");
VerticalMenu.Items[1].Style.Height = 30;
VerticalNavAccessList.Add("VerticalMenu1",true);
VerticalMenu.HoverItemStyle.Cursor = Infragistics.WebUI.Shared.Cursors.Hand;

The problem I am having is that the menu items are widely spaced out with one being about one third the way down - the other about two thirds down. The height of the menu is set to that of the page. whereas I want them to display neatly at the top of the menu. Is there a property or something to enable this? The version I have is Infragistics2.WebUI.UltraWebNavigator.v7.1, Version=7.1.20071.1061.

The aspx has ...

<ignav1:UltraWebMenu id="VerticalMenu" runat="server" Width="150px" Height = "708px" ScrollImageBottom="ig_menu_scrolldown.gif"
     ScrollImageTopDisabled="ig_menu_scrollup_disabled.gif" ScrollImageBottomDisabled="ig_menu_scrolldown_disabled.gif"
     ScrollImageTop="ig_menu_scrollup.gif" SubMenuImage="ig_menuTri.gif">
    </ignav1:UltraWebMenu></DIV>

Any help here is really appreciated - I have tried all sorts of things to get this to work without success. I'm lost!

Thanks,

Karen.