Dropdownlist

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • TdJ

    Dropdownlist

    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




  • AW

    #2
    Re: Dropdownlist

    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.
    --
    To reply, remove a "l" before the @ sign.

    Arnaud Weil - MCT, MCSD.Net, MCAD.Net


    Comment

    • TdJ

      #3
      Re: Dropdownlist

      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


      "AW" <aweill@fr.xrt. com> wrote in message
      news:eO476MQqDH A.2000@TK2MSFTN GP10.phx.gbl...[color=blue]
      > 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[/color]
      control[color=blue]
      > that will look exactly like a DropDownList from a programatic point of[/color]
      view.[color=blue]
      > --
      > To reply, remove a "l" before the @ sign.
      >
      > Arnaud Weil - MCT, MCSD.Net, MCAD.Net
      >
      >[/color]


      Comment

      • AW

        #4
        Re: Dropdownlist

        If you need help on specific details of the implementation, you can contact
        me.
        --
        To reply, remove a "l" before the @ sign.

        Arnaud Weil - MCT, MCSD.Net, MCAD.Net


        Comment

        Working...