search as you type

11 posts, 0 answers
  1. Srujana
    Srujana avatar
    38 posts
    Member since:
    Jan 2011

    Posted 18 Mar 2011 Link to this post

    Hello,

    I need a text box with search as I type(like google one), I don't see any in silverlight suite,  I was thinking about using Combo with same functionality, but my only concern is it is tied to a data column that has like 100,000 rows, I was just wondring if it would affect the performance in anyway, if yes, what is the possible solution to have the same functionality.

    Please let me know,

    Thanks,
    SC.
  2. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 19 Mar 2011 Link to this post

    Hi Srujana,

    Please, check the attached sample application - it demonstrates how to create a google-like search box with RadComboBox. Let me know if you have additional questions.

    Kind regards,
    Valeri Hristov
    the Telerik team
  3. DevCraft banner
  4. Srujana
    Srujana avatar
    38 posts
    Member since:
    Jan 2011

    Posted 19 Mar 2011 Link to this post

    Hi Valeri,

    Thanks for the prompt response and a sample code, My question is not fully answered though, Would it affect the perfomance to bind it(combo) the data field that has like 100,000 rows?

    Thanks in advance,
    Srujana.
  5. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 21 Mar 2011 Link to this post

    Hello Srujana,

    The attached application is not performance dependent on the underlying data table size as it requests only a few items from the data service.

    If you directly bind RadComboBox to a 100000 items source (e.g. you do not use the attached app) you will have to change the ItemsPanel to VirtualizingStackPanel, but in this case the filtering in the control will cease to work (this is a known limitation).

    Regards,
    Valeri Hristov
    the Telerik team
  6. Srujana
    Srujana avatar
    38 posts
    Member since:
    Jan 2011

    Posted 29 Mar 2011 Link to this post

    Thanks Valeri.

    I tried to open the code and take a look, but it is broken, It gives me compilation errors. I am trying to look at the code to see what it is doing, but I am not sure if it is getting the results from database or google? I need to search the database table to see if the entered text is matching any existing string in the table, if so, display them as options for the users so they don't type anymore, I have see it in Ajax, but not in the silverlight, I can use either textbox or combo depending on the functionality offered, if you could give me some input one how to proceed on this, I would certainly appriciate it.

    Thanks in advance,
    Srujana.
  7. George
    Admin
    George avatar
    1332 posts

    Posted 04 Apr 2011 Link to this post

    Hi Srujana, 


    Please, unload all WPF projects and reload the Silverlight ones. Please, make sure you have added the following assemblies:
    • Telerik.Windows.Controls
    • Telerik.Windows.Controls.Input
    to the following projects: AutocompleteBox.SL & AutocompleteBehavior_SL. Clean the solution and rebuild. Everything should compile. 

    The two RadComboBoxes are bound for two different data sources:
    • The top RadComboBox uses for the GoogleAutocompleteProvider
    • The bottom RadComboBox uses the StrangeWordsCollection.

    The Products database is not used in the project, but you could easily implement the logic. All you need is to download the AdventureWorks sample database and to modify the connection string. After that, you could add the following method to the ProductsService:

    [Query(IsComposable = true)]
            public IQueryable<Product> GetProductsByText(string text)
            {
                return this.ObjectContext.Products.Where(p => p.Name.StartsWith(text));
            }

    We will use this method to load the products by name from the database. 
    Now, you could implement the IAutocompleteProvider and set it for AutocompleteProvider to the RadComboBox control in xaml.

    Attached you can find the modified project. I hope this suits your needs.


    Regards,
    George
    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
  8. Aaron Fischer
    Aaron Fischer avatar
    5 posts
    Member since:
    Jul 2008

    Posted 05 Mar 2012 Link to this post

    Is there a way to load a persisted value into the selected item?  When I try this I have empty text in the combo box.
  9. George
    Admin
    George avatar
    1332 posts

    Posted 08 Mar 2012 Link to this post

    Hi,

    We are aware of this problem, but currently we don't have any workarounds. We have plans to implement RadAutocompleteBox for our further releases, but we cannot say in what time-frame it will be done. 


    Kind regards,
    George
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  10. YongKoo Kang
    YongKoo Kang avatar
    101 posts
    Member since:
    Jan 2010

    Posted 21 Sep 2012 Link to this post

    Hi, George

    I aslo use google like control in my edit view nearly same with above sample.
    When the edit view is opened with view model with some edit data,
    combox box has no source and no selectedItem untill user types and changes text,
    but it's Text can be shown because text property synched with some added property,say 'partNo', in user control
    and 'PartNo' property is binded with my view model.

    It worked well in nearly 10 usecontrols untill I encountered in 1 control which always show
    empty Text as Aaron pointed out in above thread.
    When debugging, 'PartNo' property set and Text property is synched at first but immediately Text property
    changed into empty. When runs step by step in debug, Text property shows fine but in normal running,no luck.

    Is this same reason ?
    If so, what makes me stuck is how my other usecontrols show Text property fine ?
    Would you pls give me advice about inner working a bit more ?

    Now I'm using Q1 2012 and looked in Q2 2012 but your mentioned control looks not added yet.
    As you metioned,will it be added in Q3 Oct ?

    RGDS
    Kang

  11. Ivo
    Admin
    Ivo avatar
    390 posts

    Posted 26 Sep 2012 Link to this post

    Hi Kang,

    The RadAutoCompleteBox will be released with the Q3 2012 release of RadControls for Silverlight.

    All the best,
    Ivo
    the Telerik team

    Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

  12. YongKoo Kang
    YongKoo Kang avatar
    101 posts
    Member since:
    Jan 2010

    Posted 03 Oct 2012 Link to this post

    Hi Ivo,

    Thank you for your kind info.
    I will wait Q3 arrives soon rather than reinventing the wheel.

    RGDS
    Kang
Back to Top
DevCraft banner