RadFilter doesn't work with Arabic or persian context

5 posts, 0 answers
  1. reza
    reza avatar
    6 posts
    Member since:
    Jan 2009

    Posted 13 Apr 2011 Link to this post

    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 .
  2. Tsvetina
    Admin
    Tsvetina avatar
    1876 posts

    Posted 18 Apr 2011 Link to this post

    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.

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. reza
    reza avatar
    6 posts
    Member since:
    Jan 2009

    Posted 19 Apr 2011 Link to this post

    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

  5. Saeed
    Saeed avatar
    1 posts
    Member since:
    Jul 2010

    Posted 08 Apr 2013 Link to this post

    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.
  6. fawad
    fawad avatar
    1 posts
    Member since:
    May 2014

    Posted 14 May 2014 in reply to reza Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017