多个DATAGRIDVIEW过滤器 [英] Multiple DATAGRIDVIEW filter

查看:85
本文介绍了多个DATAGRIDVIEW过滤器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用VB.NET,我有一个访问数据库,包括2个表(A,B),我在Windows窗体中通过2 DATAGRIDVIEW(1,2)查看。

现在我可以过滤任何项目的任何DATAGRIDVIEW,但问题是我想根据第1个结果过滤第二个DATAGRIDVIEW。

ex:

我过滤了DATAGRIDVIEW 1 (其中包含表A),我得到了20个结果,所以我需要DATAGRIDVIEW 2(包含表B)来过滤所有与DATAGRIDVIEW 1匹配的单元格的项目。

我不知道有任何表关系。

我认为它应该用数组完成,但我不知道怎么做。



过滤我是使用

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

SuppliersITEMSDataGridView.DataSource = Me.DATABASEDataSet.SuppliersITEMS.Select(("Convert(Description, 'System.String') LIKE '" & textbox1.text & "'")





我加载datagridview使用Visual studio,我拖动datagridview数据库并自动加载



I load the datagridview Using Visual studio, I drag the datagridview database and it load automaticly

推荐答案

不,我没有任何这个



所以我做了另一个列,做了一个数组和嵌套循环使其工作:D

无论如何谢谢
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


这篇关于多个DATAGRIDVIEW过滤器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆