How to add icons to radcomobobox

2 posts, 0 answers
  1. Avihai
    Avihai avatar
    21 posts
    Member since:
    Aug 2013

    Posted 31 Mar 2014 Link to this post


    I'm trying to add to radcomobobox icons but its not working

    ​<telerik:RadComboBox ID="rcbJobType" runat="server" EmptyMessage="Select Job Type" Width="248px">
    <telerik:RadComboBoxItem Text="Select Job Type" Value="Select Job Type" />
    <telerik:RadComboBoxItem Text="Long Term" Value="Long Term" />
    <telerik:RadComboBoxItem Text="Short Term" Value="Short Term" />
    <telerik:RadComboBoxItem Text="Last Minute" Value="Last Minute" />

    occurs on pageload
    Protected Sub IconAttached()
    Dim imgDir As New DirectoryInfo(Server.MapPath(Globals.gRootRelativeSecureURL("/Images/Layout/offDuty.png")))
    For Each file As FileInfo In imgDir.GetFiles("*.png")
    Dim item As New RadComboBoxItem(file.Name.Replace(".png", ""))
    item.ImageUrl = "Img/" + file.Name


    ****************using class for SecureURL for getting the image
                   = "<img src='" + Globals.gRootRelativeSecureURL("/Images/Layout/offDuty.png") + "' border=""0"" align=""absmiddle"">"
    End Sub
  2. Nencho
    Nencho avatar
    1890 posts

    Posted 03 Apr 2014 Link to this post

    Hello Avihai,

    As I can see you are setting the Text of the RadComboBoxItems that you add, to the image path? Do you aim to have only images as RadComboBoxItems? In addition, please refer to this documentation article, demonstrating the approach for adding images to RadComboBoxItems.


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top