RAD Menu items shows black items

4 posts, 0 answers
  1. francis
    francis avatar
    12 posts
    Member since:
    Jan 2008

    Posted 20 Oct 2009 Link to this post

    Hi ,

    I get an black item(box) on displaying of the menu items in IE8 it works fine in IE7 .
    It does not work in Firefox too.

    Here's the code
    I simply added a rad menu to my aspx page
    on page behind i added around 100 menu items and performed a databind
    Here's the code

    List

     

    <string> menuItems = new List<string>();

     

     

    for(int i=0;i<100;i++)

     

    {

    menuItems.Add(

    "A"+i);

     

    }

    RadMenu1.DataSource = menuItems;

    RadMenu1.DataBind();
    and on _menu_ItemDataBound i do these

     

     

     

     

    ((Telerik.Web.UI.

    RadMenuEventArgs)(e)).Item.BackColor = System.Drawing.Color.White;

     

    ((Telerik.Web.UI.

    RadMenuEventArgs)(e)).Item.ForeColor = System.Drawing.Color.Black;

     

     

     

    I want  the black items to disappear.
    Thanks in advance.

    Regards,
    Francis P.

  2. Yana
    Admin
    Yana avatar
    4908 posts

    Posted 21 Oct 2009 Link to this post

    Hello Francis,

    I am not able to understand this issue, please send us the definition of the menu and more detailed explanation.

    Regards,
    Yana
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. francis
    francis avatar
    12 posts
    Member since:
    Jan 2008

    Posted 21 Oct 2009 Link to this post

    Hi Yana,
    I am using the RadMenu control which is placed in a master page.
    I populate the rad menu with values from the sitemap file.

    The adding/loading of the all the menu items just works fine.
    The menu items for the rad menu are created dynamically so once there are more items on the rad menu there is a black box shown along with all the menu items.

    So for testing purpose i created a new project and added the below code and was able to get the same box again that is i set the items for the rad menu to 100 (100 menu items for the menu) and was able to reproduce the error.

    Text.aspx.

     

    <telerik:RadMenu OnClientLoad="A" CssClass="RadMenu_Default2" OnItemDataBound="_menu_ItemDataBound" ID="RadMenu1" Runat="server">  
    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
        </telerik:RadMenu> 

     

     

     

     


    Test.aspx.cs
    //Here i load 100 menu items ..
    protected void Page_Load(object sender,EventArgs e)  
    {  
    List<string> menuItems = new List<string>();   
    for(int i=0;i<100;i++)   
    {  
    menuItems.Add("A"+i);   
    }  
    RadMenu1.DataSource = menuItems;  
    RadMenu1.DataBind();  

    //The databound event i set the Back color to White and ForeColor to Black for each menu item
     
    protected void _menu_ItemDataBound(object s, EventArgs e)   
    {  
    ((Telerik.Web.UI.RadMenuEventArgs)(e)).Item.BackColor = System.Drawing.Color.White;   
    ((Telerik.Web.UI.RadMenuEventArgs)(e)).Item.ForeColor = System.Drawing.Color.Black;   
    }  
     

    Please find the attached image of the how the rad menu looks like .
    I want the items in black not to be present in the menu .

    Regards,
    Francis P.
  4. Yana
    Admin
    Yana avatar
    4908 posts

    Posted 23 Oct 2009 Link to this post

    Hi Francis,

    I still cannot observe the issue. Could you please send us the code for OnClientLoad event handler and the used css styles? Thanks

    Kind regards,
    Yana
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top