Dropdownlist

  • Thread starter Thread starter TdJ
  • Start date Start date
T

TdJ

Hi,

Maybe a really basic question, but I'm trying to change a read only
dropdownlist to look like a textbox, specifically don't I want an arrow
which usually opens the list to be displayed.

Is there any easy way to do this. Textbox doesn't not implement SelectedID
etc etc.

thanks in advance

tom
 
Hi,

You can create a custom control that inerits from a DropDownList, and
override its Render method so that it:
-calls the render of its base class when there's more than 1 item
-instantiates a textbox and call its render otherwise

It's not extremely easy to do, but it's the only way I see to make a control
that will look exactly like a DropDownList from a programatic point of view.
 
Ok,

I understand the theory of what your suggesting... the implementation will
be the fun part :)

Thanks for the advice at least I know where I should be going now!

tom
 
Back
Top