How to display an IMAGE on the left side of the RAD MENU

4 posts, 0 answers
  1. Ajay
    Ajay avatar
    66 posts
    Member since:
    May 2009

    Posted 23 Nov 2009 Link to this post

    Hi Telerik Guys !

    I have been using the RAD MENU for a quite some while in my project.

    Iam using the RADMENU in one of my project & this RADMENU is being populated dynamically .

    Now what I need to do is to display the IMAGE(LOGO) along with the RAD MENU.

    I dont know how to do it as I have not written any code in my ASPX page nor i have used any TEMPLATE.

    Below is the code that I have used in order to dynammically bind the RADMENU:-

       <telerik:RadMenu ID="RadMenu1" Width="220px" runat="server" DataSourceID="ModulesSqlDataSource" 
                                DataTextField="MOD_DET_Name" DataValueField="MOD_DET_ID" Flow="Vertical" Font-Names="Trebuchet MS" 
                                Font-Size="15px" OnItemClick="RadMenu1_ItemClick" Skin="Web20">  
                            </telerik:RadMenu> 
                            <asp:SqlDataSource ID="ModulesSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:demoDMSConnectionString %>" 
                                SelectCommand="Usp_Dms_GetModulesForDMSApplication" SelectCommandType="StoredProcedure">  
                            </asp:SqlDataSource> 
    While , below is the Item Click event of the RADMENU:-

     protected void RadMenu1_ItemClick(object sender, Telerik.Web.UI.RadMenuEventArgs e)  
        {  
     
            if (e.Item.Text == "Document Management")  
            {  
                Response.Redirect("~/DocumentManagementSystem.aspx");  
            }  
     
            else if (e.Item.Text == "Folder Permissions")  
            {  
                Response.Redirect("~/FolderPermissions.aspx");  
            }  
     
            else if (e.Item.Text == "FTP Management")  
            {  
                Response.Redirect("~/FTPManagement.aspx");  
            }  
     
            else  
            {  
                Response.Redirect("~/RestoreDocuments.aspx");  
            }  
        }  
     
        
     While , my basic requirement is to display the RADMENU just like the image that I have attached.

    Please help !!!

    Ajay Jamwal
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 23 Nov 2009 Link to this post

    Hello Ajay,

    Try out the following code to display images for each menu item:
    c#:
    protected void RadMenu1_ItemDataBound(object sender, RadMenuEventArgs e) 
        { 
            e.Item.ImageUrl = "Images/Image1.gif";  
        } 

    Thanks
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. vikas
    vikas avatar
    11 posts
    Member since:
    Dec 2008

    Posted 07 May 2013 Link to this post

    Hi,

    I was wondering if you can resize the image because if somehow the image is out of the menu propotion.

    Please help, Thank you
  5. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 08 May 2013 Link to this post

    Hi vikas,

    can you please provide more details on your scenario? Can you clarify how do you mean to resize the image? An image file or a short video demonstrating the problematic appearance would be very helpful.

    Regards,
    Kate
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top