468,554 Members | 1,966 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,554 developers. It's quick & easy.

DropDownList SelectedIndexChanged event not firing when in a panel

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.
Nov 18 '05 #1
2 2851
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.


Nov 19 '05 #2
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.


Nov 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Shiju Poyilil | last post: by
11 posts views Thread by Santosh | last post: by
reply views Thread by NPC403 | last post: by
1 post views Thread by UniDue | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.