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

Make Search as you Type AND instead of OR

3 Answers 36 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Tony
Top achievements
Rank 1
Tony asked on 28 May 2018, 06:15 PM

Hi Telerik,

With search as you type, if I type:

Bob Smith

It will currently return any rows that contain BOB or SMITH.  I want to change it so that it will only return rows that contain BOB and SMITH.

How do I do that?

3 Answers, 1 is accepted

Sort by
0
Vladimir Stoyanov
Telerik team
answered on 31 May 2018, 11:18 AM
Hello Tony,

In order to change the results that the "search as you type" feature returns, you can modify the searching criteria. To return all rows that contain Bob and SMITH, you can do the following search -> "BOB +SMITH". You can read some more about that in the Search as you type article in our documentation.

I hope this helps.

Regards,
Vladimir Stoyanov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Tony
Top achievements
Rank 1
answered on 31 May 2018, 11:59 AM

Hi Vladimir,

Thanks for the suggestion.  The problem is that my user's aren't technical enough to enter text like that.  Is there a way for me to change the parsing of tokens so thatI can just make that happen automatically?

0
Vladimir Stoyanov
Telerik team
answered on 04 Jun 2018, 03:43 PM
Hello Tony,

I researched the described scenario and currently it is not possible to modify the parsing of the tokens since this logic is internal to the control. That said, you can execute the SearchByText command which will allow you to control the search parameter(this way you will be able to programmatically search for "BOB +SMITH"). However, please note that this will change the Text property of the search textbox.

Regards,
Vladimir Stoyanov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
GridView
Asked by
Tony
Top achievements
Rank 1
Answers by
Vladimir Stoyanov
Telerik team
Tony
Top achievements
Rank 1
Share this question
or