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

Parameter Keyword case sensitive

1 Answer 93 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Philip
Top achievements
Rank 1
Philip asked on 27 Aug 2010, 02:21 PM
I have created a paramater that allows the user to enter a keyword, and use a like statement to return the results. This works fine, however, the search appears to be case sensitive. Is there any way to make the parament non case sensitive?

=Fields.ModDescription    like     ="%" + Parameters.KWSearch.Value +"%"

The soultions I have seen on the forum suggest that I would need to use the TOUPPER in my parameter. I do not see how that would work on a word such as Cable, where only the first letter is capitalized.

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 31 Aug 2010, 05:21 PM
Hello Philip,

For case insensitive filtering you have to apply the ToUpper() string function to both the Fields.ModDescription and Parameters.KWSearch.Value. As shown bellow:
= CStr(Fields.ModDescription).ToUpper()  Like  = "%" + CStr(Parameters.KWSearch.Value).ToUpper() +"%"

For more information check out the Filtering with string parameter that allows free user input blog article.

Kind regards,
Peter
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
General Discussions
Asked by
Philip
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or