473,763 Members | 1,373 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DropDownList SelectedIndexCh anged event not firing when in a panel

When dynamically placing dropdownlists inside a panel, the
dropdownlist's SelectedIndexCh anged 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 3055
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 SelectedIndexCh anged 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.AutoPostBac k = true;
dl3.SelectedInd exChanged += new
System.EventHan dler(this.dl3_S electedIndexCha nged);
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 SelectedIndexCh anged 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
9782
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 a handler for the SelectedIndexChanged event. The server control is instantiated upon every request. It currently adds 2 items to the dropdownlist from the database.
2
3049
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.. only the labels (caption) and the invisible literal controls are binded.. Now based on the invisible literal control values I get the information from DB to bind it with each dropdown list (I am doing this in the item databound event) Also based on...
3
2303
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 Asp.Net DropDownList changes text in an adjacent TextBox by either concatenating SelectedItem.Text (from the DropDownList) if it is not in the TextBox, or removing it if it is in the TextBox. This generally works very well.
5
4396
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 my controls are created in CreateChildControls() for my custom control. Here's a snippet of code: DropDownList dd = new DropDownList(); dd.ID = "DropDown1"; if( !Page.IsPostBack )
1
3357
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 grdNewVideos_ItemCreated(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles grdNewVideos.ItemCreated If e.Item.ItemType = ListItemType.EditItem Then AddHandler CType(e.Item.FindControl("ddlArtistNames"),...
11
5815
by: Santosh | last post by:
Dear all , i am writting following code. if(Page.IsPostBack==false) { try { BindSectionDropDownlist();
2
3305
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 details first. The DropDownList is actually a custom control called DropDownListWithCommandEvent that inherits from DropDownList. The reason I have created this is to create a DropDownList that will bubble a Command event to the containing...
7
12066
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 fact I fill this list dynamically. I use the following code:
4
5388
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 = True for that Dorpdownlist as well. What could be I missing. Any leads will be helpful. Thanks in advance!
0
9386
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9998
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9938
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9822
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8822
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6642
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5270
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5406
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3917
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 we have to send another system

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.