Home All Groups Group Topic Archive Search About
Author
8 Aug 2006 7:25 AM
Li Pang
Hi,

I want to use dropdownlist web control as combobox control in window form,
ie, allow to enter any text value in the box just like a textbox.

In window form the combobox has a style, the ability can be made by
selecting between "dropdown" or "dropdownlist" values. Is there equivalent
property in the web dropdownlist control. If no anybody knows a solution for
that?

thanks in advance

Author
8 Aug 2006 2:49 PM
clickon
You could try using the attrivutes collection of the DropDownList control,
this allows you to set arbitrary HTML atributes.

Show quoteHide quote
"Li Pang" wrote:

> Hi,
>
> I want to use dropdownlist web control as combobox control in window form,
> ie, allow to enter any text value in the box just like a textbox.
>
> In window form the combobox has a style, the ability can be made by
> selecting between "dropdown" or "dropdownlist" values. Is there equivalent
> property in the web dropdownlist control. If no anybody knows a solution for
> that?
>
> thanks in advance
Author
9 Aug 2006 2:12 PM
marss
Li Pang написав:
> Hi,
>
> I want to use dropdownlist web control as combobox control in window form,
> ie, allow to enter any text value in the box just like a textbox.
>

Hi,
It is impossible because DropDownList and Textbox change into two
different HTML elements in browser window (DropDownList->SELECT and
Textbox->INPUT). The task can be accomplished by substituting standard
SELECT element with set of other HTML elements(for example: INPUT+DIV)
but it requires strong DOM and javascript skills.
Author
10 Aug 2006 5:22 PM
Dan Christensen
marss wrote:
> Li Pang написав:
> > Hi,
> >
> > I want to use dropdownlist web control as combobox control in window form,
> > ie, allow to enter any text value in the box just like a textbox.
> >
>
> Hi,
> It is impossible because DropDownList and Textbox change into two
> different HTML elements in browser window (DropDownList->SELECT and
> Textbox->INPUT). The task can be accomplished by substituting standard
> SELECT element with set of other HTML elements(for example: INPUT+DIV)
> but it requires strong DOM and javascript skills.

There are several custom controls out there that accomplish it, find
the one you like, but I'd be worried about how it degrades with
javascript disabled, etc.  Since it's not a native element.

eg:  http://www.codeproject.com/aspnet/combobox.asp