DataView.ROWFILTER在同一列上的多个条件 [英] Multiple criteria in DataView.ROWFILTER on same column

查看:94
本文介绍了DataView.ROWFILTER在同一列上的多个条件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以在同一列上为Dataview.Rowfilter设置多个条件吗?

例如:

Dataview.Rowfilter =Column1 =&Var1& AND Column1 =&Var2



谢谢

Anil Sharma

Can I have more than 1 criteria for Dataview.Rowfilter on the same column ?
For example:
Dataview.Rowfilter = "Column1 = " & Var1 & "AND Column1 = " & Var2

Thanks
Anil Sharma

推荐答案

是的,您可以根据问题使用多个条件来过滤数据视图。但请确保使用正确的操作数和语法。例如:如果它是 varchar 类型,那么它就像这样

Yes, You can have multiple condition based on the problem to filter a dataview. But make sure you use the correct operand and the syntax. For example: if it a varchar type then it goes like this
dv.RowFilter = " Status='Active' OR Status='InActive'"



int type


int type

dv.RowFilter = "id > 0 AND index = 4"


这篇关于DataView.ROWFILTER在同一列上的多个条件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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