سؤال

Is there a way of adding an image to a string within a telerik combobox - if so can you point me in the direction of a code snippet or link

I am using the combobox with languagues and want the country flag beside the country name

هل كانت مفيدة؟

المحلول

You can use the ItemTemplate for this:

<telerik:RadComboBox ID="RadComboBox1" runat="server">
    <ItemTemplate>
        <asp:Image ID="Image1" runat="server" ImageUrl='<%# Eval("ImageUrl") %>' />
        <%# Eval("TextColumn") %>
    </ItemTemplate>
</telerik:RadComboBox>

نصائح أخرى

You will find something similar in RadComboBox for ASP.NET AJAX

<telerik:RadComboBox ID="RadComboBox1" runat="server" Skin="Outlook" AllowCustomText="true">
  <Items>
     <telerik:RadComboBoxItem ImageUrl="*Your Image*" Text="RadComboBox" runat="server" >
        </telerik:RadComboBoxItem>
    </Items>
</telerik:RadComboBox>
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top