DropDownList SelectedIndexChanged event not firing when in a panel

Discussion in 'ASP .Net' started by Paul Lacey, Jan 16, 2004.

  1. Paul Lacey

    Paul Lacey Guest

    When dynamically placing dropdownlists inside a panel, the
    dropdownlist's SelectedIndexChanged event doesn't fire. If you take
    the dropdownlist out of the panel it works properly. Autopostback is
    set to True on the DropDownList. Is there something I'm missing? Any
    help would be greatly appreciated.
    Paul Lacey, Jan 16, 2004
    #1
    1. Advertising

  2. Paul Lacey

    DagoFlores Guest

    Is the same problem that I have, it works fine outside of the Panel,
    but not inside... I'm trying with ListBox webserver controls.

    Dago.

    Paul Lacey wrote:
    > When dynamically placing dropdownlists inside a panel, the
    > dropdownlist's SelectedIndexChanged event doesn't fire. If you take
    > the dropdownlist out of the panel it works properly. Autopostback is
    > set to True on the DropDownList. Is there something I'm missing?

    Any
    > help would be greatly appreciated.
    DagoFlores, Feb 17, 2005
    #2
    1. Advertising

  3. Re: DropDownList SelectedIndexChanged event not firing when in a p

    Maybe you didn't wire the event? In C# we added the following code to the
    Page_Load event:

    DropDownList dl3 = new DropDownList();
    dl3.Items.Add("5");
    dl3.Items.Add("6");
    dl3.Items.Add("7");
    dl3.AutoPostBack = true;
    dl3.SelectedIndexChanged += new
    System.EventHandler(this.dl3_SelectedIndexChanged);
    Panel1.Controls.Add(dl3);

    It actually worked without any problems. Hth.

    Kind regards,
    Nikander & Margriet Bruggeman

    "DagoFlores" wrote:

    > Is the same problem that I have, it works fine outside of the Panel,
    > but not inside... I'm trying with ListBox webserver controls.
    >
    > Dago.
    >
    > Paul Lacey wrote:
    > > When dynamically placing dropdownlists inside a panel, the
    > > dropdownlist's SelectedIndexChanged event doesn't fire. If you take
    > > the dropdownlist out of the panel it works properly. Autopostback is
    > > set to True on the DropDownList. Is there something I'm missing?

    > Any
    > > help would be greatly appreciated.

    >
    >
    =?Utf-8?B?TmlrYW5kZXIgJiBNYXJncmlldCBCcnVnZ2VtYW4=, Feb 17, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. DesignerX
    Replies:
    2
    Views:
    3,825
    Bob Carsto
    Nov 14, 2003
  2. Lew Barnesson
    Replies:
    3
    Views:
    803
    Lew Barnesson
    Dec 4, 2004
  3. =?Utf-8?B?Q3VybHlGcm8=?=

    dropdownlist selectedIndexChanged event not firing

    =?Utf-8?B?Q3VybHlGcm8=?=, Aug 14, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    2,620
    =?Utf-8?B?Q3VybHlGcm8=?=
    Aug 14, 2005
  4. BentleyInc

    DropDownList.SelectedIndexChanged event not firing

    BentleyInc, Dec 10, 2004, in forum: ASP .Net Web Controls
    Replies:
    4
    Views:
    1,238
    Steven Cheng[MSFT]
    Dec 14, 2004
  5. Dabbler

    DropDownList selectedIndexChanged event not firing

    Dabbler, May 6, 2005, in forum: ASP .Net Web Controls
    Replies:
    6
    Views:
    810
    Josh Behl
    Aug 13, 2006
Loading...

Share This Page