Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > SelectedIndexChanged in Composite control

Reply
Thread Tools

SelectedIndexChanged in Composite control

 
 
Russ
Guest
Posts: n/a
 
      07-13-2004
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Composite Control ListBox SelectedIndexChanged event not firing studen771 ASP .Net Web Controls 0 03-27-2007 11:13 PM
Composite vs non composite Controls Mike ASP .Net Web Controls 4 03-11-2005 05:47 AM
Losing Composite Control property that another Composite Control ... Chad ASP .Net Building Controls 0 02-01-2005 09:01 PM
Possible to create a composite control that has a child control that is a validator that validates the composite control itself? Jonathan Eric Miller ASP .Net Building Controls 2 07-22-2004 10:58 PM
Composite control with dynamic composite controls sleigh ASP .Net 1 02-12-2004 06:24 PM



Advertisments