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

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

3 Answers 127 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Ajay
Top achievements
Rank 2
Ajay asked on 23 Nov 2009, 10:27 AM
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

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 23 Nov 2009, 12:24 PM
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.
0
vikas
Top achievements
Rank 1
answered on 07 May 2013, 11:49 PM
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
0
Kate
Telerik team
answered on 08 May 2013, 11:39 AM
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.
Tags
Menu
Asked by
Ajay
Top achievements
Rank 2
Answers by
Princy
Top achievements
Rank 2
vikas
Top achievements
Rank 1
Kate
Telerik team
Share this question
or