数据集过滤器在一行中

时间:2012-05-02 06:22:17

标签: sql-server vb.net c#-3.0

是否有这样的可能性在一个数据视图中选择两个条件,如

Childds.Tables(“ColumnList”)。DefaultView.RowFilter = customername ='hello'

dv = Childds.Tables("ColumnList").DefaultView()

它给出了正确答案,但

Childds.Tables(“ColumnList”)。DefaultView.RowFilter = customername ='hello'或customername ='hai'

dv = Childds.Tables("ColumnList").DefaultView()

在这种情况下,它只需要第一个并忽略第二个或条件 如何编写rowfilter以在客户多个时选择

1 个答案:

答案 0 :(得分:0)

这里可能的答案:DataView RowFilter Syntax [C#]
我相信这对你来说已经足够了:

dataView.RowFilter = "CustomerName IN ('hello', 'hai')";