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

Display image in RadComboBox

2 Answers 159 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Marjan
Top achievements
Rank 1
Marjan asked on 15 Jul 2008, 06:49 AM
hi,
I work on custom control(inherit RadComboBox) with multi column combobox. For header is used HeaderTemplate and on ItemsRequested I create RadComboBoxItem for each element. For each element I want to display a picture from Table. If put in  RadComboBoxItem an Image control and fill ImageUrl with path it works exactly what I want.
The question is how to show picture from table? I'm able to read the picture into System.Drawing.Image control and make some extra changes on the image but I don't now how to display the image in the RadComboBox.
Any suggestions how to do it?

2 Answers, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 18 Jul 2008, 08:02 AM
Hi Marjan,

This is quite an interesting case.

It is possible to achieve the desired functionality by implementing your own HttpHandler which serves the Images from the database. In other words, the HttpHandler will load an Image based on an ID, for example, and will return it.

Finally, you can have RadComboBoxItems with Image controls in them which have urls pointing to the HttpHandler specifying the ID of the Image to be loaded.

Please read the articles linked below to find out how HttpHandlers are created, registered and how they can be used to serve Images:
Sincerely yours,
Simon
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Marjan
Top achievements
Rank 1
answered on 19 Jul 2008, 04:44 AM
Thanks for your reply,

 I'll try with HttpHandler, but it seems not easy way.
Tags
ComboBox
Asked by
Marjan
Top achievements
Rank 1
Answers by
Simon
Telerik team
Marjan
Top achievements
Rank 1
Share this question
or