Search in Two Column

6 posts, 0 answers
  1. Olivier
    Olivier avatar
    146 posts
    Member since:
    Nov 2010

    Posted 08 Nov 2012 Link to this post

    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>
  2. Olivier
    Olivier avatar
    146 posts
    Member since:
    Nov 2010

    Posted 11 Nov 2012 Link to this post

    Hello

    Nobody has a answer ?

    if it's possible or not ?
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Cat Cheshire
    Cat Cheshire avatar
    128 posts
    Member since:
    Jun 2010

    Posted 12 Nov 2012 Link to this post

    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
  5. Olivier
    Olivier avatar
    146 posts
    Member since:
    Nov 2010

    Posted 12 Nov 2012 Link to this post

    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,
  6. Kalina
    Admin
    Kalina avatar
    918 posts

    Posted 12 Nov 2012 Link to this post

    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.
  7. Olivier
    Olivier avatar
    146 posts
    Member since:
    Nov 2010

    Posted 12 Nov 2012 Link to this post

    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,
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017