同一列的行过滤器 [英] rowfilter for same column
问题描述
你好,
我想使用RowFilter
从dataview中找到列值说John
.我知道我们可以用这个
dv.RowFilter = " ; pre>
但该列还包含由;
分隔的John;Josh
值
如何过滤所有包含John
的行,即使它们是John;Josh
?
在此先感谢解决方案
尝试使用
dv.RowFilter = " ;
但是,如果您在同一列中有多个名称,建议您尝试将其拆分为单独的行(可能在单独的表中),以使数据模型更易于处理.基本上就像设计数据库一样.
参考: DataColumn.Expression属性 [ dv.RowFilter = " ;
Hello,
I want to find column value say John
from dataview using RowFilter
. I know we can use this
dv.RowFilter = "USAGE='John'";
but the column also contains John;Josh
value separated by ;
How to filter both condition all the rows which contain John
even if they are John;Josh
?
Thanks in advance
Try using
dv.RowFilter = "USAGE LIKE '*John*'";
However if you''re having several names in the same column, I''d suggest that you try to break this to separate rows, possibly in separate tables in order to make the data model more easy to handle. Basically it''s just like designing a database.
Reference: DataColumn.Expression Property [^]
Uselike
dv.RowFilter = "USAGE like '%John%'";
这篇关于同一列的行过滤器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!