473,378 Members | 1,439 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Filter the DataGridView itself

nev
251 100+
How do I filter a DataGridView with data that was entered programatically. I would like to achieve something like dgv.sort... but, dgv.filter does not exist.
Oct 8 '07 #1
4 1264
nev
251 100+
Or if there is really no other way, how will I transfer the data from my dgv to a dataview temporarily so that I can do dv.rowfilter? I tried dv = dgv but it is bad. It is wrong. It is badwrong. It is BADONG!
Oct 8 '07 #2
nev
251 100+
I also tried this but it didn't work.

dv = DirectCast(.dtgSelectfromlist.DataSource, DataView)
Oct 8 '07 #3
nev
251 100+
No need to answer the above. I used a bindingsource to gratify my sort / filter needs. Now, my new challenge is how to filter except the selected item in the dgv. For example, in "State" column, I have 'new jersey', 'hawaii', 'kentucky' and 'connecticut'. I select 'kentucky' and click the filter button. Now, it should display 'new jersey', 'hawaii' and 'connecticut' only. It should exclude 'kentucky' which is the cell I have selected to exclude from the list.

Any ideas how can this be done?
Oct 8 '07 #4
nev
251 100+
ooopsss... don't bother, answer is using sql statement not equal :-)
Oct 8 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: michael sorens | last post by:
Is it possible to store an unbound DataGridView component into a setting? I naively tried defining a Setting that is a DataGridView called DGV, then simply assigning it:...
2
by: mike604 | last post by:
I am learning vb.net but having trouble with this....: Essentially, I have 2 datagridview's on 2 different forms. I want one of the datagridviews to change based on what the user clicks of the...
1
by: martin1 | last post by:
Hi, All, DataGridView is populated with all coumns from database since i need some columns data for condition statement, after that I want to show rest of column in the DataGridView, so how to...
7
by: Rainer Queck | last post by:
Hi NG, is it possible, and if yes how, to change the encoding of a datagridview? I am loading a csv file to a dgv using a certain Encoding, but there are columns using different encoding like...
3
by: =?Utf-8?B?Sm9obiBCdW5keQ==?= | last post by:
New to databinding in vs2005, I always did it manually in 2003. I have no problem loading comboboxes, and a change in that combobox changes the data in the textboxes but I can not figure out a way...
0
by: =?Utf-8?B?aW1yYW4uYQ==?= | last post by:
Hi all, I am having a problem with inserting rows in to my datagridview control. The datagridview is bound to a bindingsource with a filter set. If i try and add a row to the datagridview while...
0
by: Dennis Francek | last post by:
Hello I have populated a treeview from my dataset and by clicking in the treeview i want to get the corresponding table shown in a datagridview. Ive managed this by looking at each DataRow and...
0
by: SAM | last post by:
Hi All, i work in project(vb) i deploy a table to DataGridView. and i try to Filter the Datagridview with the combination of 4 combobox. my problem i can't do that for the 4 combobox in same time....
0
by: Big P | last post by:
Hello, I would like to filter multiple rows in DataGridView ( VB Express) My form has 3 Textboxes, 1 Button and 2 DataGridViews. The datagridview1 has 3 columns of data. My datagridview1 looks...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.