RadComboBox autocomplete - Search in any place

9 posts, 0 answers
  1. Srdjan
    Srdjan avatar
    3 posts
    Member since:
    Apr 2012

    Posted 23 Aug 2012 Link to this post

    I was wondering if this is implemented in WPF version also?

    http://www.telerik.com/community/forums/winforms/combobox-and-listbox/radcombobox-autocomplete---search-in-any-place.aspx

    I'm trying to use a RadComboBox (window) in the application I'm developing.
    As far a as I can see the autocomplete mode uses the entered text to filter those items starting with this text. I would like to go beyond this functionality by filtering those items which contains the entered text, not only at the begining but also in any place.

    As an example, if I have a combobox containing cities and I write "lon" it should filter, not only "london" city but also "barcelona" (among others cities matching the filter).
  2. Georgi
    Admin
    Georgi avatar
    364 posts

    Posted 28 Aug 2012 Link to this post

    Hi Srdjan,

    We don't have an Autocomplete modes, but instead of that we have TextSearchModes and one of the modes is Contains. So you can combine it with IsFilteringEnabled="True" OpenDropDownOnFocus="True" and it seems that you can achieve the desired property. You can check it out in the Configurator example of RadComboBox here in our examples (the corresponding Silverlight example you can find here).
    Also we are currently developing an RadAutoCompleteBox control which will be available in Q3 2012 release.
    Hope this will help.

    Greetings,
    Georgi
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. Kalpan
    Kalpan avatar
    2 posts
    Member since:
    Jan 2014

    Posted 24 Nov 2014 in reply to Srdjan Link to this post

    has this been done ??
  4. Kalpan
    Kalpan avatar
    2 posts
    Member since:
    Jan 2014

    Posted 24 Nov 2014 in reply to Georgi Link to this post

    sorry meant to sent it to you. does WPF has this functionality now.
  5. Kalin
    Admin
    Kalin avatar
    1349 posts

    Posted 26 Nov 2014 Link to this post

    Hello Kalpan,

    Yes the AutoCompleteBox has been released with Q3 2012 version of the controls. You can check its documentation on the following link:
    http://www.telerik.com/help/wpf/radautocompletebox-overview.html

    You can also check the WPF demos here and the corresponding Silverlight demos here.

    Hope this helps.

    Regards,
    Kalin
    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.

     
  6. Ankesh
    Ankesh avatar
    3 posts
    Member since:
    Aug 2018

    Posted 17 Apr in reply to Kalin Link to this post

    Hi,
    We are evaluating telerik WPF controls and have following requirement similar to post above:

    1) Dropdown should be able to paging, If the user scrolls to the bottom of the dropdown and there are more items in the collection available at the API, then the next page of items should be loaded and added to the dropdown.

    2) A further extension to the control described in point one is the ability for the user to filter the collection shown in the dropdown. When the user types into the dropdown the characters will be sent to the API to filter the collection shown in the dropdown.

    Can you suggest if above requirement can be solved using RadAutoCompleteBox or RadComboBox?
    If you can share any sample where we can integrate RadAutoCompleteBox or RadComboBox data via API using MVVM.

  7. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    886 posts

    Posted 22 Apr Link to this post

    Hi Ankesh,

    To achieve the desired result you can use an editable RadComboBox with a custom FilteringBehavior and use a VirtualQueryableCollectionView as its ItemsSource.

    I've prepared a small sample project to demonstrate the approach I have in mind. Please note that it uses the Northwind database.

    Please have a look and let me know whether something similar would work for you. I will be awaiting your reply.

    Regards,
    Dilyan Traykov
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  8. Ankesh
    Ankesh avatar
    3 posts
    Member since:
    Aug 2018

    Posted 22 Apr in reply to Dilyan Traykov Link to this post

    Hi Dilyan Traykov,

    Thank you for responding.
    I checked the solution, but it seems not working out for my scenario.
    Because we are getting data from HTTP Web API and do not have IQueryable provider instance.

    I tried to subscribe to ItemsLoading and ItemsLoaded events, but they are not firing in my case too.

     

    Assume below case where API is giving me 10 records into a list and once I know more records needs to be displayed then I can load more records and add it to list/observable collection:

    var list = dbContext.Customers.OrderBy(c => c.CustomerID).Take(10).ToIList();

    this.customers = new VirtualQueryableCollectionView(list) { LoadSize = 10 };
    this.customers.ItemsLoaded += Customers_ItemsLoaded;
    this.customers.ItemsLoading += Customers_ItemsLoading;

    Can you suggest or provide a sample where data is being fetched from Web APIs and load more rows calls also goes to Web API?

    Really appreciate your help.

    Thanks And Regards,
    Ankesh

  9. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    886 posts

    Posted 24 Apr Link to this post

    Hi Ankesh,

    For the ItemsLoading event to get fired, you need to first set the VirtualItemCount property of the VirtualQueryableCollectionView.

    public NorthwindViewModel()
    {
        this.dbContext = new NorthwindContext();
        this.customers = new VirtualQueryableCollectionView() { LoadSize = 10, VirtualItemCount = dbContext.Customers.Count() };
        this.customers.ItemsLoading += Customers_ItemsLoading;
    }

    You can then load the items in a similar fashion by replacing the Customers DbSet with the collection provided by the Web API.

    private void Customers_ItemsLoading(object sender, VirtualQueryableCollectionViewItemsLoadingEventArgs e)
    {
        var list = dbContext.Customers.OrderBy(c => c.CustomerID).Skip(e.StartIndex).Take(e.ItemCount).ToIList();
        this.customers.Load(e.StartIndex, list);
    }

    Please let me know if this works for you.

    Regards,
    Dilyan Traykov
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top