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

D

Dave M

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?
 
M

Maddy

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">
 

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,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top