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

Searching two fields

3 Answers 151 Views
SearchBox
This is a migrated thread and some comments may be shown as answers.
dhlennon
Top achievements
Rank 1
dhlennon asked on 16 Aug 2013, 01:15 PM
I am using radsearchbox against a database of town or city names, and that works great.

I have an additional field in my database of 'alternative spellings' of these town names  (anglicised versions, ones without special accent characters, etc)

Is it possible to get my searchbox to match against not just the field specified in my datatextfield but against both fields?

Should I be using the DataSourceSelect server side event to modify the query?

Thanks

3 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 21 Aug 2013, 07:09 AM
Hello,

Thank you for contacting Telerik support.

You can achieve such behavior by using OnDataSourceSelect server event and setting the correct select statement. I am attaching a sample web page where similar behavior is implemented.

Please review it and let me know if you have further questions.

Regards,
Plamen
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
christof
Top achievements
Rank 1
answered on 31 Mar 2014, 09:30 AM
Hi,

Is this also possible using DataTables instead of SQLDataSource?
Thanks!
0
Plamen
Telerik team
answered on 02 Apr 2014, 10:49 AM
Hi,

Yes, in cases when DataSource property is used as in this help topic you could use again the OnDataSourceSelect event and set the DataSource again to the filtered according to your scenario DataTable.

Hope this will be helpful.

Regards,
Plamen
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
SearchBox
Asked by
dhlennon
Top achievements
Rank 1
Answers by
Plamen
Telerik team
christof
Top achievements
Rank 1
Share this question
or