Firing datagrid dropdownlist on selection change

Discussion in 'ASP .Net Web Controls' started by Tro y, Feb 13, 2004.

  1. Tro y

    Tro y Guest

    I have a datagrid with a template that has several dropdownlists when in edit mode. I need an event handler for the dropdownlist so on a new selection several other dropdownlists are updated with related data. I have written code to do just this on the itemCreated event of the datagrid, but need to execute this same code on a selection change in the dropdownlist. How do I do this in code behind? How do I reference the datagrid control and capture the event

    Thank you

    Troy
    Tro y, Feb 13, 2004
    #1
    1. Advertising

  2. Tro y

    Teemu Keiski Guest

    Hi,

    you can wire the event handler say in ItemCommand event handler (search the
    control from Item and then just wire in code), or you can wire it
    declaratively in aspx (...OnSelectedIndexChanged="method_name"...) for the
    DDL (in the template).

    --
    Teemu Keiski
    MCP, Microsoft MVP (ASP.NET), AspInsiders member
    ASP.NET Forum Moderator, AspAlliance Columnist


    "Tro y" <> wrote in message
    news:...
    I have a datagrid with a template that has several dropdownlists when in
    edit mode. I need an event handler for the dropdownlist so on a new
    selection several other dropdownlists are updated with related data. I have
    written code to do just this on the itemCreated event of the datagrid, but
    need to execute this same code on a selection change in the dropdownlist.
    How do I do this in code behind? How do I reference the datagrid control
    and capture the event?

    Thank you.

    Troy
    Teemu Keiski, Feb 13, 2004
    #2
    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. Simon Niederberger
    Replies:
    2
    Views:
    16,486
    Christian Kaufhold
    Jan 7, 2005
  2. Replies:
    11
    Views:
    953
  3. Replies:
    0
    Views:
    358
  4. Satish
    Replies:
    8
    Views:
    9,637
    Satish
    Mar 31, 2008
  5. Loebb
    Replies:
    0
    Views:
    198
    Loebb
    Feb 23, 2004
Loading...

Share This Page