How can i trap the SelectedIndexChanged event on a dropdown within a Datagrids EditItemTemplate colu

Discussion in 'ASP .Net Datagrid Control' started by Dave M, Dec 13, 2004.

  1. Dave M

    Dave M Guest

    I have a datagrid with two edititemtemplate columns that contain
    dropdownlists, these are 1)lists manufacturers of cars, 2)lists car
    models for a manufacturer.

    i need to rebind the second dropdown with only the models for the new
    manufacturer that has been selected from the first dropdown, this means
    i have to trap the SelectedIndexChanged event of the first drop down
    list

    Q. How do i trap the selectedIndexchanged event of a dropdown in the
    edititemtemplate of a datagrid?
     
    Dave M, Dec 13, 2004
    #1
    1. Advertising

  2. Dave M

    Maddy Guest

    u can create a eventhandler function and assign it onselectionchanged in the
    aspx page

    eg:-
    <ItemTemplate>
    <asp:DropDownList id="DropDownList1" runat="server" Width="128px"
    OnSelectedIndexChanged="DropDownList2_SelectedIndexChanged"
    AutoPostBack="True">


    "Dave M" <> wrote in message
    news:...
    > I have a datagrid with two edititemtemplate columns that contain
    > dropdownlists, these are 1)lists manufacturers of cars, 2)lists car
    > models for a manufacturer.
    >
    > i need to rebind the second dropdown with only the models for the new
    > manufacturer that has been selected from the first dropdown, this means
    > i have to trap the SelectedIndexChanged event of the first drop down
    > list
    >
    > Q. How do i trap the selectedIndexchanged event of a dropdown in the
    > edititemtemplate of a datagrid?
    >
     
    Maddy, Dec 17, 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. john
    Replies:
    0
    Views:
    379
  2. john
    Replies:
    0
    Views:
    336
  3. =?Utf-8?B?SmFjaw==?=

    Dropdown list - SelectedIndexChanged event doesn't fire

    =?Utf-8?B?SmFjaw==?=, Mar 14, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    3,534
    =?Utf-8?B?SmFjaw==?=
    Mar 14, 2005
  4. =?Utf-8?B?Q2hyaXMgTGFuZQ==?=

    Dropdown selectedindexchanged event firing when submit button clic

    =?Utf-8?B?Q2hyaXMgTGFuZQ==?=, Apr 5, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    2,725
    =?Utf-8?B?Q2hyaXMgTGFuZQ==?=
    Apr 6, 2005
  5. Jacques Leclerc

    adding item to dropdown within edititemTemplate

    Jacques Leclerc, Dec 19, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    244
    Jacques Leclerc
    Dec 19, 2003
Loading...

Share This Page