同一列的行过滤器 [英] rowfilter for same column

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

问题描述

你好,

我想使用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 [^]


Use like

dv.RowFilter = "USAGE like '%John%'";


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

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