Solved

Filtering on a datagridview if the user selects a cell

Posted on 2006-06-14
2
176 Views
Last Modified: 2010-04-23
I have a datagridview being filled from a datatable that is filled from a query my user wants to click on a cell and filter for that value.

I kind of sort understand about using the defaultfiew.rowfiler of the data table but cant get it to work
I have a button that says filter on click i need to find the cell value and then run the row filter on the table then re bind? is that correct PLEASE HELP
0
Comment
Question by:LeeHopkins
2 Comments
 
LVL 2

Accepted Solution

by:
Mystify earned 100 total points
ID: 16910505
use the event

Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick

the e paramters contain the column and row index of hte clicked cell, you can then use those to get the data you need to do your filter.
0
 

Author Comment

by:LeeHopkins
ID: 16911273
the cellcontentclick was flakey, not always firing but the cellClick work great
0

Featured Post

ScreenConnect 6.0 Free Trial

Check out the updates in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI that improves session organization and overall user experience. See the enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question