SelectedIndexChanged in Composite control

Discussion in 'ASP .Net Web Controls' started by Russ, Jul 13, 2004.

  1. Russ

    Russ Guest

    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
    Russ, Jul 13, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    707
  2. sleigh
    Replies:
    1
    Views:
    2,672
    sleigh
    Feb 12, 2004
  3. Chad
    Replies:
    0
    Views:
    209
  4. Mike

    Composite vs non composite Controls

    Mike, Mar 10, 2005, in forum: ASP .Net Web Controls
    Replies:
    4
    Views:
    251
    Sundararajan
    Mar 11, 2005
  5. studen771
    Replies:
    0
    Views:
    494
    studen771
    Mar 28, 2007
Loading...

Share This Page