R
Russ
I have a composite control with a Microsoft.Web.UI.WebControls
TabControl and Multipage controls, plus a bunch of text boxes and a
couple of DropDownLists. Of course all the controls are created
dynamically. I need to handle the event when the dropdown lists have
their selected item changed, so I can pop up a dialog to allow editing
of the item.
I cannot get the SelectedIndexChanged event to fire. Here is what I
am doing:
When the DropDownList is created, I add an event handler like:
DropDownList List = new DropDownList ();
List.SelectedIndexChanged += new System.EventHandler(EditItem);
And created a handler that is a member of the class that contains the
composite control:
private void EditItem (object sender, System.EventArgs e)
{
}
The event never fires. I read that change events do not fire until
postback time. This is not good, because I need an immediate response
to the selection change. I tried adding List.AutoPostBack = true.
This does cause post back, but the event still does not fire.
Can anyone help?
Thanks, Russ
TabControl and Multipage controls, plus a bunch of text boxes and a
couple of DropDownLists. Of course all the controls are created
dynamically. I need to handle the event when the dropdown lists have
their selected item changed, so I can pop up a dialog to allow editing
of the item.
I cannot get the SelectedIndexChanged event to fire. Here is what I
am doing:
When the DropDownList is created, I add an event handler like:
DropDownList List = new DropDownList ();
List.SelectedIndexChanged += new System.EventHandler(EditItem);
And created a handler that is a member of the class that contains the
composite control:
private void EditItem (object sender, System.EventArgs e)
{
}
The event never fires. I read that change events do not fire until
postback time. This is not good, because I need an immediate response
to the selection change. I tried adding List.AutoPostBack = true.
This does cause post back, but the event still does not fire.
Can anyone help?
Thanks, Russ