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

Search in Two Column

5 Answers 151 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
Olivier
Top achievements
Rank 2
Olivier asked on 08 Nov 2012, 03:01 PM
Hello

I use an Object DataSource to load in my RadAutoCompleteBox.

My table has 3 columns  : ID , TEXT1 , TEXT2

I would like the user can search on the TEXT1 and also the TEXT2 ,

i search in the City table, we have Zip code and City name , and if we can search on the third column
it'll be great.

Have you an solution ?

Thanks
Olivier,

<SFWeb:WebBusinessBindingSource runat="server" ID="WbAffaires" BusinessObjectName="oAffairesBo"></SFWeb:WebBusinessBindingSource>

 <telerik:RadAutoCompleteBox runat="server" ID="RadAutoCompleteBox1" Width="340"  DataSourceID="WbAffaires" Filter="StartsWith" CssClass="RadAutoCompleteBox_Default"
                            DropDownWidth="300px" DataTextField="CityColumn" DataValueField="ZipCodeColumn" InputType="Token" Delimiter="," EmptyMessage="Ville, CP ou département.">
                            </telerik:RadAutoCompleteBox>

5 Answers, 1 is accepted

Sort by
0
Olivier
Top achievements
Rank 2
answered on 11 Nov 2012, 09:54 AM
Hello

Nobody has a answer ?

if it's possible or not ?
0
Cat Cheshire
Top achievements
Rank 1
answered on 12 Nov 2012, 04:04 PM
You can implement the search in two colums with some custom logic in the SelectMethod of your ObjectDatasource:
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.objectdatasource.selectmethod.aspx
0
Olivier
Top achievements
Rank 2
answered on 12 Nov 2012, 04:13 PM
Have an sample ?

If i have name and last name ?

john smith
eddy white

i want search "john" or "eddy" or "smith" or "white"

I make in my query  : select name+' '+lastname from MyTable , but my filter StartWidth and i don't search on "smith" or "White".

thanks
Olivier,
0
Kalina
Telerik team
answered on 12 Nov 2012, 05:19 PM
Hi olivier,

Please take a look at this forum thread where your question has been already answered.


Best regards,
Kalina
the Telerik team
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 their blog feed now.
0
Olivier
Top achievements
Rank 2
answered on 12 Nov 2012, 05:26 PM
Hello,

i write Twice cause i have no answer , i m sorry, but it's really important,
if you can help me in other post, i will be very happy !

thanks
Olivier,
Tags
AutoCompleteBox
Asked by
Olivier
Top achievements
Rank 2
Answers by
Olivier
Top achievements
Rank 2
Cat Cheshire
Top achievements
Rank 1
Kalina
Telerik team
Share this question
or