如何使用rowfilter作为“Like”与数据集有问题 [英] How to use rowfilter as "Like" with dataset has problem

查看:152
本文介绍了如何使用rowfilter作为“Like”与数据集有问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我有一个问题:



DataSet DS;

DS.Tables [0] .DefaultView.RowFilter = [名称]喜欢''%w [eēéěè]%''';

运算符错误:字符串模式''%w [eēéěè]%''是无效。

DS.Tables [0] .DefaultView.RowFilter =[姓名]喜欢''w [eēéěè] *''';

中的错误喜欢运算符:字符串模式''w [eēéěè] *''无效。

我喜欢这个

DS.Tables [0] .DefaultView .RowFilter =[姓名]喜欢''%w [[]eēéěè[]]%'';



它不起作用.... 。



我该怎么办?

......



谢谢你的阅读........

如果你解决了,非常感谢.....

解决方案

试试这个 http://www.csharp-examples.net/dataview-rowfilter/ [ ^ ]

他们也有很好的例子用于不同类型的过滤器。



像这样给出的过滤器。

 dataView.RowFilter =   Name LIKE'j *' //以开头的值 '  j' 
dataView.RowFilter = 名称LIKE'%jo%' //包含' jo'
dataView.RowFilter = 名称不喜欢'j *' //值' t以'j'开头


hello everyone, I have a problem :

DataSet DS ;
DS.Tables[0].DefaultView.RowFilter="[Name] Like ''%w[eēéěè]%''";
Error in Like operator: the string pattern ''%w[eēéěè]%'' is invalid.
DS.Tables[0].DefaultView.RowFilter="[Name] Like ''w[eēéěè]*''";
Error in Like operator: the string pattern ''w[eēéěè]*'' is invalid.
I do like this
DS.Tables[0].DefaultView.RowFilter="[Name] Like ''%w[[]eēéěè[]]%''";

it doesn''t work .....

what should I do ?
......

thank u for your reading........
if you solve , very thank .....

解决方案

try this http://www.csharp-examples.net/dataview-rowfilter/[^]
they have pretty good examples for different types of filters too .

the like filter given like this.

dataView.RowFilter = "Name LIKE 'j*'"       // values that start with 'j'
dataView.RowFilter = "Name LIKE '%jo%'"     // values that contain 'jo'
dataView.RowFilter = "Name NOT LIKE 'j*'"   // values that don't start with 'j'


这篇关于如何使用rowfilter作为“Like”与数据集有问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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