This is a migrated thread and some comments may be shown as answers.

Menu Ghosting

2 Answers 62 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Charlie Bross
Top achievements
Rank 1
Charlie Bross asked on 12 Aug 2008, 05:15 PM
I am running into an issue where the menu is being displayed on the screen as a basic UL List first before it gets the CSS skin applied and becomes a menu. Has anyone run into this issue before? I am generating the menu dynamically from the OnPreRender method of the web page.

Here is a sample movie of what is happening...
Menu Ghosting Example

************ SAMPLE CODE *************
    RadMenu mainMenu = new RadMenu();
        mainMenu.ID = "windowMenu";
        mainMenu.Skin = "Vista";
        mainMenu.CollapseAnimation.Type = AnimationType.None;
        mainMenu.ExpandAnimation.Type = AnimationType.None;
        mainMenu.Style.Add("border-bottom", "solid 1px black");
        mainMenu.Style.Add(HtmlTextWriterStyle.MarginBottom, "9px");
        mainMenu.Style.Add("width","100%");
        mainMenu.Style.Add("display","block");
        mainMenu.Style.Add("float", "none");
        mainMenu.Style.Add("border", "none");
        mainMenu.Style.Add("border-bottom", "solid 3px black");
        mainMenu.ClickToOpen = true;
   
    //***** CODE TO ADD ALL THE MENU ITEMS ******
   
        Page.Controls.AddAt(0,mainMenu);

2 Answers, 1 is accepted

Sort by
0
Accepted
Atanas Korchev
Telerik team
answered on 13 Aug 2008, 07:24 AM
Hi Charlie Bross,

The roblem is that you are adding the menu as the first control in the page. This would render it outside of the HTML tag hence the "ghosting" effect. Please add the menu within the BODY tag of your page e.g.

Page.Form.Controls.AddAt(0, menu);

Kind regards,
Albert
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Charlie Bross
Top achievements
Rank 1
answered on 13 Aug 2008, 03:00 PM
You are 100% correct! As always thank you so much for your awesome response time and resolution to my issue!
Tags
Menu
Asked by
Charlie Bross
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Charlie Bross
Top achievements
Rank 1
Share this question
or