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

filter using wildcards

3 Answers 205 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ralph
Top achievements
Rank 1
Ralph asked on 01 Jul 2010, 09:41 AM
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

3 Answers, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 06 Jul 2010, 08:59 AM
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
0
Ralph
Top achievements
Rank 1
answered on 20 Jul 2010, 08:42 AM
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
0
Maria Ilieva
Telerik team
answered on 22 Jul 2010, 01:31 PM
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
Tags
Grid
Asked by
Ralph
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Ralph
Top achievements
Rank 1
Maria Ilieva
Telerik team
Share this question
or