Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DropDownWidth of dropdownlist

Status
Not open for further replies.

MaddogC

Programmer
Dec 4, 2003
134
GB
How can I increase the DropDownWidth of a dropdownlist at runtime?
 
It should automatically grow/shrink if you make sure that you have a blank setting in the width property of the DropDownList

--------------------------------------------------------------------------------------------------------------------------------------------

Need help finding an answer?

Try the search facility ( or read FAQ222-2244 on how to get better results.
 
Sorry, perhaps this needs further explanation. I want the dropdownlist itself to be a fixed width and have set it to 150px, but when the user chooses an option, I want the list of options to display wider than the box size.

I believe this is achieved in VB.Net using the "DropDownWidth" property, but this is not the same in ASP.Net.

In Access it is the "List Width" property.
 
Ah, I see. The DropDownList doesn't come with this functionality as far as I am aware.

I have seen some 3rd party controls that do it though (I guess they extend the control and allow HTML/DHTML to be rendered within the DropDownList Item) so I may be able to dig them out if you wanted?

--------------------------------------------------------------------------------------------------------------------------------------------

Need help finding an answer?

Try the search facility ( or read FAQ222-2244 on how to get better results.
 
There is an article here:


that show's how to have a multiple column dropdownlist within a datagrid, and by the first image on there, I think it is what you are trying to do. The previous article on how the control was created, can be found at:


--------------------------------------------------------------------------------------------------------------------------------------------

Need help finding an answer?

Try the search facility ( or read FAQ222-2244 on how to get better results.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top