Solved

Filtering on a datagridview if the user selects a cell

Posted on 2006-06-14
2
178 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
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…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

752 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