Click here to Skip to main content
16,014,838 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

I want to populate a dropdown on the selected index changed event of another dropdown in a gridview.

Thanks in advance
Posted
Comments
walterhevedeich 19-Apr-11 2:37am    
Is the dropdown part of the gridview or is it outside?

1 solution

Well, you need to have Cascading Dropdown in place and then based on the dropdown values a filter on Grid data.

It's not clear on if it's a winforms or web.
For ASP.NET, have a look at these:
Implementing Cascading DropDownList in ASP.NET GridView[^]
Ajax Cascading DropDownList With Database Example in GridView[^]


For winforms, Google/CodeProjectSearch for Cascading dropdown. That would give you first part. For filtering, at time of dropdown change you need to filter the data (dataview probably!) and then use that as source for your grid.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900