Marcia Marino
Top achievements
Rank 1
Marcia Marino
asked on 24 Jan 2008, 07:09 AM
How do I display a Image that is storage in a database on a combobox
3 Answers, 1 is accepted
0
Hi Marcia Marino,
To be able to put an Image in a RadComboBox you should use Templates.
For reference, please view:
Templates Online Demo
Overview and when to use templates
Kind regards,
Instantly find answers to your questions at the new Telerik Support Center
To be able to put an Image in a RadComboBox you should use Templates.
For reference, please view:
Templates Online Demo
Overview and when to use templates
Kind regards,
Simeon
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Marcia Marino
Top achievements
Rank 1
answered on 25 Jan 2008, 08:07 AM
I have this on the aspx
and this on the codebehind
<tr align="left" valign="top">
<td align="left" valign="top" style="white-space:nowrap;">
<asp:Label id="lblImages" runat="server" SkinID="LeftLabel" />
:
</td>
<td align="left" valign="top" style="white-space:nowrap;">
<telerik:RadComboBox Width="200px" Height="115px" ID="cbImages" Runat="server">
<ItemTemplate>
<img src='<%# "~/imagefetch.ashx?size=1&imageid=" + DataBinder.Eval(Container, "Attributes['id']") %>'>
<%
# DataBinder.Eval(Container, "Attributes['Title']") %>
</ItemTemplate>
</telerik:RadComboBox>
</td>
</tr>
and this on the codebehind
SqlDataSource1.ConnectionString = cxnstr;
SqlDataSource1.SelectCommand =
"SELECT title, id FROM albumimages WHERE (album = 1)";
cbImages.MarkFirstMatch = true;
cbImages.Skin =
"Vista";
The image does not appear, the image is storage on a database.
0
Hi Marcia Marino,
Are you sure you have bound the RadComboBox control to a DataTable with the results from the query?
Because that may be the case. Otherwise your code looks Ok.
Sincerely yours,
Simeon
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Are you sure you have bound the RadComboBox control to a DataTable with the results from the query?
Because that may be the case. Otherwise your code looks Ok.
Sincerely yours,
Simeon
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center