Click here to Skip to main content
15,891,473 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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 .....
Posted

1 solution

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.
VB
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'
 
Share this answer
 
Comments
Sakvanna 12-Dec-12 23:16pm    
thank you , but i want like start with 'ja' , 'je' , 'jr' so
dataView.RowFilter = "Name LIKE 'j[aer]*'" but it is error like operator..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900