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

RadComboBox autocomplete - Search in any place

8 Answers 713 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Srdjan
Top achievements
Rank 1
Srdjan asked on 23 Aug 2012, 02:56 PM
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).

8 Answers, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 28 Aug 2012, 08:15 AM
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.

0
Kalpan
Top achievements
Rank 1
answered on 24 Nov 2014, 07:20 PM
has this been done ??
0
Kalpan
Top achievements
Rank 1
answered on 24 Nov 2014, 07:20 PM
sorry meant to sent it to you. does WPF has this functionality now.
0
Kalin
Telerik team
answered on 26 Nov 2014, 01:18 PM
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.

 
0
Ankesh
Top achievements
Rank 1
answered on 17 Apr 2019, 12:33 PM

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.

0
Dilyan Traykov
Telerik team
answered on 22 Apr 2019, 11:07 AM
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.
0
Ankesh
Top achievements
Rank 1
answered on 22 Apr 2019, 01:25 PM

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

0
Dilyan Traykov
Telerik team
answered on 24 Apr 2019, 02:56 PM
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.
Tags
ComboBox
Asked by
Srdjan
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Kalpan
Top achievements
Rank 1
Kalin
Telerik team
Ankesh
Top achievements
Rank 1
Dilyan Traykov
Telerik team
Share this question
or