Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi

I want to Display result in Gridview based on multiple seleted dropdown items.i tried with single dropdownlist its working.But i want to select <b>District </b>in first dropdown, Select <b>Taluka </b>in Second Dropdown List, Select <b>village </b>in third drop down list. finally i want to display result in Gridview.

How do i do this any idea pls ..?
Posted

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

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.

Try!
 
Share this answer
 
Comments
shiva.kore 26-Sep-10 14:12pm    
Thank You sandeep. let me try!
Abhijit Jana 27-Sep-10 1:12am    
Sandeep, I am not sure that, he is looking for Cascading dropdown. As, he want to display the data based on the selection and he never told he wants to populate the dropdown list based on another dropdown.
How did you get the data when you used the single dropdown ? I beleive You are filtering the data based on the value dropdown. So, for multiple dropdown, you have to the same thing, where you have to write query like select * from table name where Column1='dropdownlist1value' and column2='dropdownlist2value' and Columun='dropdownlist3value'

Based on the result set you can bind the data to grid.
 
Share this answer
 
Comments
Sandeep Mewara 27-Sep-10 1:49am    
But I am sure of that based on what he is selecting:
District -> Taluka -> Village

And based on the selection Grid data.
Abhijit Jana 27-Sep-10 2:01am    
Yes, but I think OP is not looking for Cascadding Dropdown. If yes, then you are a good Mind Reader my friend ;)
MalikRizwan 27-Sep-10 9:12am    
based on his question, logically its cascadding dropdown. as District has taluka and then village

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