filter using wildcards

4 posts, 0 answers
  1. Ralph
    Ralph avatar
    6 posts
    Member since:
    Jul 2010

    Posted 01 Jul 2010 Link to this post

    hi

    I need filter expressions like "hi%there" with function "contains" in the grid. Having EnableLinqExpression = true makes a FilterExpression like "....contains(hi%there)", but finds no records.
    Having EnableLinqExpression = false makes "LIKE '%hi%there%'" and returns all records, if there where no filter at all.

    Any Ideas?

    Ralph
  2. Yavor
    Admin
    Yavor avatar
    11 posts

    Posted 06 Jul 2010 Link to this post

    Hello Ralph,

    Depending on whether the control is using Linq expressions or not, the filter expressions will be different. More information on this is available in the following article:

    http://www.telerik.com/help/aspnet-ajax/grdoperatewithfilterexpression.html

    Whenever you need to alter the filter expression, you can cancel out the filter command, and re-fire the command with the altered value(s):

    http://www.telerik.com/help/aspnet-ajax/grdfirecommandeventfromcode.html

    I hope that this information gets you started properly.

    Best wishes,
    Yavor
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Ralph
    Ralph avatar
    6 posts
    Member since:
    Jul 2010

    Posted 20 Jul 2010 Link to this post

    Hello Yavor,

    just back from holiday...

    I know the links in your answer. What I need is a little bit different: The examples for "contains" are in the form of "([CustomerID] LIKE '%ALFKI%')"
    What I would need is "([CustomerID] LIKE '%A%I%')"  but that leads to the troubles I described in my posting.

    thanks
    Ralph
  4. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 22 Jul 2010 Link to this post

    Hello Ralph,

    Using '%A%I% is not support SQL syntaxes in RadGrid. You could use just one condition and not the both in one wildcard. Please review the following help topic:

    http://www.telerik.com/help/aspnet-ajax/grdoperatewithfilterexpression.html



    Regards,
    Maria Ilieva
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top