Asked by:
Anyone ever used RadComboBox with Images?

Question
-
User-186058747 posted
Everything I have read online states that you can add images to it by simply adding a "ImagePath" property. Haven't read about any other stipulations...
Here is mine, which works fine but there are no images! Not even the little annoying boxes that yell out "hey, I need a path here!"
<telerik:RadComboBox ID="list_website" Runat="server" Skin="Default" Width="200px"> <Items> <telerik:RadComboBoxItem ImagePath="~/images/site_1.jpg" Selected="True" Text="All Websites" Value="0" /> <telerik:RadComboBoxItem ImagePath="~/images/site_2.jpg" runat="server" Text="Website 1" Value="1" /> <telerik:RadComboBoxItem ImagePath="~/images/site_3.jpg" runat="server" Text="Website 2" Value="2" /> <telerik:RadComboBoxItem ImagePath="~/images/site_4.jpg" runat="server" Text="Website 3" Value="3" /> <telerik:RadComboBoxItem ImagePath="~/images/site_5.jpg" runat="server" Text="Website 4" Value="4" /> <telerik:RadComboBoxItem ImagePath="~/images/site_6.jpg" runat="server" Text="Website 5" Value="5" /> <telerik:RadComboBoxItem ImagePath="~/images/site_7.jpg" runat="server" Text="Website 6" Value="6" /> <telerik:RadComboBoxItem ImagePath="~/images/site_8.jpg" runat="server" Text="Website 7" Value="7" /> <telerik:RadComboBoxItem ImagePath="~/images/site_9.jpg" runat="server" Text="Website 8" Value="8" /> <telerik:RadComboBoxItem ImagePath="~/images/site_10.jpg" runat="server" Text="Website 9" Value="9" /> <telerik:RadComboBoxItem ImagePath="~/images/site_11.jpg" runat="server" Text="Website 10" Value="10" /> <telerik:RadComboBoxItem ImagePath="~/images/site_12.jpg" runat="server" Text="Website 11" Value="11" /> </Items> <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> </telerik:RadComboBox>
Why oh why?!?!?!?!Thursday, January 15, 2009 9:41 PM
All replies
-
User648872898 posted
here is my sample code. This works
Description
</td> <td style="width: 125px;">Image
</td> </tr> </table> </HeaderTemplate> <ItemTemplate> <table style="text-align: left"> <tr> <td style="width: 100px;"><%
# DataBinder.Eval(Container.DataItem, "PrintingDirectionName")%></td> <td style="width: 125px;"> <asp:Image ID="Image1" runat="server" ImageUrl='<%# DataBinder.Eval(Container.DataItem, "ImageURL")%>' /> </td> </tr> </table> </ItemTemplate> </telerik:RadComboBox>the data source is as follows:
<asp:LinqDataSource ID="LDSPrintingDirection" runat="server" ContextTypeName="DataClassesDataContext" Select="new (PrintingDirectionId, PrintingDirectionName, ImageURL)" TableName="PrintingDirections"> </asp:LinqDataSource>and my data is as folows:
1 Not selected ~/images/x.jpg
2 Direction 1 ~/images/1.jpg
3 Direction 2 ~/images/2.jpg
2 Direction 3 ~/images/3.jpg
3 Direction 4 ~/images/4.jpg
2 Direction 5 ~/images/5.jpg
3 Direction 6 ~/images/6.jpg
2 Direction 7 ~/images/7.jpg
3 Direction 8 ~/images/8.jpgand I have images added to the project (THIS IS IMPORTANT) under the images folder
Tuesday, January 27, 2009 6:54 PM -
User342794281 posted
Is it possible to add an image to the selected item? I have used the method shown, but the images only appear in the drop down list, not the selected item.
Monday, August 30, 2010 3:44 PM