Solved

Filtering on a datagridview if the user selects a cell

Posted on 2006-06-14
2
177 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB 2005 Tooltips on Form Load Event 15 34
Disable extension 8 48
Winform Module - What is the ASP.Net equiv 2 28
How to repeat the data 4 20
This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
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…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

828 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