SelectedIndexChanged in Composite control

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 found out how to pop up a dialog using JScript, but I can't see any
way to make it work with my dynamic controls. I cannot even 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. So I added List.AutoPostBack = true. This
does cause post back, but the event still does not fire.

Help???

Thanks, Russ
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top