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

RAD Menu items shows black items

3 Answers 64 Views
Menu
This is a migrated thread and some comments may be shown as answers.
francis
Top achievements
Rank 1
francis asked on 20 Oct 2009, 01:27 PM
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.

3 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 21 Oct 2009, 08:48 AM
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.
0
francis
Top achievements
Rank 1
answered on 21 Oct 2009, 12:31 PM
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.
0
Yana
Telerik team
answered on 23 Oct 2009, 11:39 AM
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.
Tags
Menu
Asked by
francis
Top achievements
Rank 1
Answers by
Yana
Telerik team
francis
Top achievements
Rank 1
Share this question
or