Click here to Skip to main content
15,901,122 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am using VB.NET, I have an access database includes 2 tables (A,B) which I am viewing in the windows form by 2 DATAGRIDVIEW (1,2).
Now I can filter any DATAGRIDVIEW for any item, but the problem is that i want to filter the second DATAGRIDVIEW according to the results in the 1st.
ex:
I filtered DATAGRIDVIEW 1 (which contains table A) and I got 20 results, so I need DATAGRIDVIEW 2(which contains table B) to filter for all the items which got a matching cell with DATAGRIDVIEW 1.
I don't have any table relations.
I think it should be done with array, But I don't know how.

To Filter I am using
C#
SuppliersITEMSDataGridView.DataSource = Me.DATABASEDataSet.SuppliersITEMS.Select(("Convert(Description, 'System.String') LIKE '" & textbox1.text & "'")


I load the datagridview Using Visual studio, I drag the datagridview database and it load automaticly
Posted
Updated 3-Jun-14 16:59pm
v3
Comments
DamithSL 3-Jun-14 22:07pm    
How you filter DATAGRIDVIEW 1? update the question with your code?
How you load item to DATAGRIDVIEW 2?( without filtering)
BulletVictim 4-Jun-14 1:18am    
Assuming by "I don't have any table relations." you are referring to not having PK and FK on the tables?
Is there any column in the two tables that have the same value(ID's, ID NUMBER,REFERENCE NUMBER,etc(not knowing what type of data you have)) that can be used as a link between the two tables?

1 solution

no i dont have any of that

so i made another column, made an array and nested loop to make it work :D
thanks anyway
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900