使用数据表作为数据源过滤数据网格视图 [英] Filtering a Data Grid View with Data Table as data source
问题描述
您好,我创建了一个自定义控件,用于过滤数据网格视图控件的行.数据网格视图的数据源是绑定源,因此过滤器很简单.我只是简单地称为BindingSource1.Filter(filterCommand);现在,数据网格视图"的数据源实际上是我部门中另一个人编写的自定义对象,名为:
private PASport.Proxy.StrongTypesNS. pdsFormDataSet
如果需要的话,我可以从中提取一个DataView或一个DataTable ...但是这两个对象都不提供filter方法...我知道DataView有一个RowSelect方法可以返回一组行,并且DataTable具有Select方法,但是我不知道如何使DataGridView显示这些更改.
Hello, I have created a custom control that filters the rows of a data grid view control. The data source of the data grid view was a binding source, so the filter was easy. I simply called the BindingSource1.Filter(filterCommand); and this worked fine and dandy.
Now the Data Source of the Data Grid View is now actually a custom object written by another guy in my department called:
private PASport.Proxy.StrongTypesNS.pdsFormDataSet
from this I can extract both a DataView or a DataTable if I desire... However both these objects don't provide the filter method... I understand DataView has a RowSelect method that returns a set of rows and that DataTable has a Select method but I don't know how to make DataGridView show those changes.
推荐答案
那又怎样?会阻止您将自定义数据集与绑定源一起使用?
So what is stopping you from using the custom dataset with a bindingsource?
这篇关于使用数据表作为数据源过滤数据网格视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!