Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#4.0
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 12-Dec-12 15:06pm
Sakvanna2.3K

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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'
  Permalink  
Comments
Sakvanna at 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)



Advertise | Privacy | Mobile
Web03 | 2.8.140926.1 | Last Updated 12 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100