all groups > asp.net building controls > april 2004 >
You're in the

asp.net building controls

group:

Dropdownlist


Dropdownlist koen van meerbeeck
4/19/2004 3:01:23 PM
asp.net building controls:
Hi All

I'm creating an application and I want to add images to a dropdownlist in
asp.net using C#.

Can anybody help me with this plz.

Koen


Re: Dropdownlist Juliet Choy
4/21/2004 5:12:20 PM
It is not quite possible to add images to a *real* dropdownlist control
in asp.net since it is not supported in HTML <select> element anyway.

What I usually do to accomplish similar effect is to actually use a
DataGrid inside a Panel control. The panel control would be rendered as
a <div> tag and you can use the display: overflow; stylesheet to do the
scrolling effect; and you can use the DataGrid's intrinsic support of
SelectItemTemplate and selection mechanism to accomplish the
SelectedItem of the dropdownlist.

Hope this helps you.

Regards,
Juliet Choy
Hong Kong
MVP - ASP.NET


[quoted text, click to view]
Re: Dropdownlist Scott Mitchell [MVP]
4/21/2004 7:28:55 PM
[quoted text, click to view]

Peter Broune has released a control (EasyListBox) that has this
functionality. Behind the scenes, it's not a <select>, but a <span> and
a <table> inside, using CSS properties. You can see a live demo at:
http://easylistbox.com/demoQuickStart.aspx#custom

(Works only with IE, I'm told...)


--

Scott Mitchell
mitchell@4guysfromrolla.com
http://www.4GuysFromRolla.com
http://www.ASPFAQs.com
http://www.ASPMessageboard.com

Re: Dropdownlist koen van meerbeeck
4/22/2004 11:13:34 AM
Hi Juliet

Do you have example code how to do this? This would really help me out.

Koen


[quoted text, click to view]

AddThis Social Bookmark Button