This is a migrated thread and some comments may be shown as answers.

RadFilter doesn't work with Arabic or persian context

4 Answers 60 Views
Filter
This is a migrated thread and some comments may be shown as answers.
reza
Top achievements
Rank 1
reza asked on 13 Apr 2011, 11:32 AM
Hi,
I'm using telerik RadFilter with RadFilterSqlQueryProvider but unfortunately I couldn't filter my datasource with persian or arabic contexts.
as I checked the generated result by RadFilterSqlQueryProvider  it misses N keyword for Navarchar fields for example when we are filterring a nvarchar field we should write TSQL such this : select * from x where Name Like N'%رضا%' but the filter control just gives select * from x where Name Like '%رضا%' which can only work on varchar fields not Nvarchars.
I set the culture to both arabic and persian cultures but nothing happened.
Any help to solve this issue will be appreciated .

4 Answers, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 18 Apr 2011, 04:06 PM
Hello Reza,

Have you tried using Dynamic Linq filter expressions instead of Transact SQL ones? RadFilter is not designed to create the kind of expressions that you describe, so you can either modify the generated one before applying it or consider using another RadFilterQueryProvider.

Kind regards,
Tsvetina
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
reza
Top achievements
Rank 1
answered on 19 Apr 2011, 04:36 PM
Hi dear Admin,
First of thanks for your reply, but I'm afraid to tell you that the DynamicLinqProvider is not compatible with EF specially if you usenavigation properties.
But I fixed it with just two lines of code which I wrote using regularexpression.
first line replaced all surrounded string with quotations and put an N character before them and  in the next line I removed brackets surrounded field names.then it worked completly correct with EF (string where clause on objectquery)
But a suggetion why you do not put an N character before fields in your sql query generations ? in this way you can support both Varchar and Nvarchar field types

0
Saeed
Top achievements
Rank 1
answered on 08 Apr 2013, 10:54 PM
hi reza and admin
is this problem solved at Q1 2013 or not,if not where can i put the code to solve this problem,
thanks.
0
fawad
Top achievements
Rank 1
answered on 14 May 2014, 06:21 AM
Hi Reza,
Can you please let us know exactly what was the solution for that? I am also encountering the same issue with Dari Language which is similar to Arabic.
Tags
Filter
Asked by
reza
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
reza
Top achievements
Rank 1
Saeed
Top achievements
Rank 1
fawad
Top achievements
Rank 1
Share this question
or