473,503 Members | 2,197 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3035
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
9751
by: DesignerX | last post by:
I have a dynamically created composite server control. The composite control contains a dropdownlist, a validator and a label. I have the dropdownlist AutoPostBack set to true and have defined...
2
3032
by: Shiju Poyilil | last post by:
Hi ! I have a requirement wherein i am binding a datalist which contains a label (Caption for the field) and some literal hidden fields and a dropdown list. When I am binding to the datalist.....
3
2275
by: Lew Barnesson | last post by:
Hi All, I have looked and looked for an answer to the following problem (without success), and would be very grateful for a solution. The problem: The SelectedIndexChanged event code of an...
5
4373
by: bryanp10 | last post by:
I have a page that is almost entirely dynamically created. Textboxes and checkbox are working fine, firing events, and persistent their state. DropDownList is giving me a major headache. All...
1
3278
by: CurlyFro | last post by:
i have a userControl (.ascx) that has a dropdownlist embedded in a datagrid. the dropdownlist autopostback is set to true. why isn't the selectedIndexChanged firing? Private Sub...
11
5787
by: Santosh | last post by:
Dear all , i am writting following code. if(Page.IsPostBack==false) { try { BindSectionDropDownlist();
2
3280
by: jnoody | last post by:
The problem I am having is with the SelectedIndexChanged event not always firing or the SelectedIndex property not being correct when the event does fire. The code is below, but here are some...
7
12047
by: Damien | last post by:
Hi guys, I'm trying to learn ASP.NET and got a problem with DroDownList... SelectedIndexChanged doesn't fire. Maybe you'll be able to suggest something. I think it may be connected with the...
4
5368
by: aamir | last post by:
Hello, I guess the subject line says it all. I have put Trace.Warn() in the SelectedIndexChanged event handler, but it does not get listed when the trace is on for that page. I have AutoPostback =...
0
7287
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7349
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5594
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5022
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4688
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3177
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3168
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1521
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
399
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.