Click here to Skip to main content
12,634,651 members (27,303 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C# 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 16: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 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)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.161208.2 | Last Updated 12 Dec 2012
Copyright © CodeProject, 1999-2016
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