Click here to Skip to main content
15,946,074 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have binded the gridview by using datasource then how to filter from it by perticular selecting couloumn value?
Posted
Comments
Florian Braun 15-Apr-15 3:23am    
i understand you want to select a single cell and filter your gridview showing only rows where in that selected column you have the same value?
dawood abbas 15-Apr-15 3:31am    
yes
dawood abbas 15-Apr-15 4:34am    
dont you get?
Maciej Los 15-Apr-15 17:11pm    
What have you tried till now? Where are you stuck?
What framework: WinForms? WebControls? WPF?

Data grids have a filter property. Build up a filter object and assign it to the filter property. You DO NOT filter the data at the datasource... That will cause major problems. Let the grid do the filtering in the view like it is supposed to.

The documentation for your specific data grid should have information on doing this.
 
Share this answer
 
Please, read my comment to the question.

I'd suggest to use Google[^]. Tons of examples are available, for example:
ASP.NET Gridview with Filter in Header[^]
Walkthrough: Selecting and Filtering a Subset of Data with the LinqDataSource and GridView Controls[^]

You have to try to do something before you ask a question (minimum effort), then come back here when you get stuck to post detailed question.
 
Share this answer
 
Comments
dawood abbas 21-Apr-15 5:31am    
@Maciej Los I tried with many times then only to came here for result.I did with view state.some are said its not a good way thats why i ddnt post my code.
Maciej Los 21-Apr-15 12:20pm    
OK, but have you found your own solution? Does my answer was helpful? If yes, then accept it (formally) to remove the question from unanswered list.

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