Long Submenu of RadMenu background yield bug

2 posts, 0 answers
  1. Max
    Max avatar
    34 posts
    Member since:
    Dec 2011

    Posted 17 Feb 2012 Link to this post

    Hello Forumians!

    Problem reflected in the attachment.

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="Parus.WebClient.WebForm1" %>
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <telerik:RadScriptManager ID="ScriptManager" runat="server" />
        <div>
         <telerik:RadMenu ID="MainMenu" runat="server" />
        </div>
        </form>
    </body>
    </html>
    cs
    using System;
     
    namespace Parus.WebClient
    {
        public partial class WebForm1 : System.Web.UI.Page
        {
            protected void Page_Load(object sender, EventArgs e)
            {
                 
            }
            protected override void OnInit(EventArgs e)
            {
                base.OnInit(e);
     
                MainMenu.Items.Add(new Telerik.Web.UI.RadMenuItem());
                MainMenu.Items[0].Text = "MainMenu.Items.Add(new Telerik.Web.UI.RadMenuItem());MainMenu.Items.Add(new Telerik.Web.UI.RadMenuItem());";
                MainMenu.Items[0].Items.Add(new Telerik.Web.UI.RadMenuItem());
                MainMenu.Items[0].Items[0].Text = "MainMenu.Items.Add(new Telerik.Web.UI.RadMenuItem());MainMenu.Items.Add(new Telerik.Web.UI.RadMenuItem());";
     
                MainMenu.Items[0].Items.Add(new Telerik.Web.UI.RadMenuItem());
                MainMenu.Items[0].Items[1].Text = "MainMenu.Items.Add(new Telerik.Web.UI.RadMenuItem());MainMenu.Items.Add(new Telerik.Web.UI.RadMenuItem());";
                MainMenu.Items[0].Items.Add(new Telerik.Web.UI.RadMenuItem());
                MainMenu.Items[0].Items[2].Text = "MainMenu.Items.Add(new Telerik.Web.UI.RadMenuItem());MainMenu.Items.Add(new Telerik.Web.UI.RadMenuItem());";
                MainMenu.Items[0].Items.Add(new Telerik.Web.UI.RadMenuItem());
                MainMenu.Items[0].Items[3].Text = "MainMenu.Items.Add(new Telerik.Web.UI.RadMenuItem());MainMenu.Items.Add(new Telerik.Web.UI.RadMenuItem());";
            }
        }
    }
  2. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 17 Feb 2012 Link to this post

    Hi Max,

    The appearance that you describe is not a bug of the RadMenu control but it is rather due to the current implementation of the sprite image. In general the control is not designed for such long items and therefore the width of the image that is applied for the hover effect is just not long enough for your scenario. You can, however, easily change the sprite image, so it exceeds its current width and apply it instead of the currently used one. You can refer to the following help article for detailed explanation on how to achieve it:
    http://www.telerik.com/help/aspnet-ajax/menu-appearance-creating-custom-skins-sprite.html

    Regards,
    Kate
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top