Solved

Filtering on a datagridview if the user selects a cell

Posted on 2006-06-14
2
174 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
Comment Utility
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
Comment Utility
the cellcontentclick was flakey, not always firing but the cellClick work great
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
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…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now