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

Pageable RadAutoCompleteBox?

8 Answers 121 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
Raman
Top achievements
Rank 1
Raman asked on 11 Jun 2013, 09:42 PM
Hi Team - Is it possible to have paging or load on demand feature with RadAutoCompleteBox control? I have thousands of records to show in an autocompletebox which takes a lot of time to load.

8 Answers, 1 is accepted

Sort by
0
Ivo
Telerik team
answered on 17 Jun 2013, 03:19 PM
Hi,

Loading items on demand can be easily implemented by filtering the items on the server side, before passing them to the RadAutoCompleteBox. You can find attached an example that demonstrates this.

Regards,
Ivo
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Emmanuel
Top achievements
Rank 1
answered on 14 May 2014, 04:28 PM
Hi,

I'm using the RadAutoCompleteBox as you also do in your exemple but there is a strange behavior.
I checked, in your sample, there is the same issue:
When I set the ItemsSource in a asynchronous way, I'm loosing the fonctionnaly of Autocompletion.Append.
When My callback is call, it set the items source, but the text of the first element is not appended to my current selection.

How can I fix it ? or how can I manually append the first element of my list after setting the itemsource.

Regars,

0
Vladi
Telerik team
answered on 16 May 2014, 08:48 AM
Hello,

We are aware of the described issue with the SuggestAppend AutoCompleteMode of the control when setting it's ItemsSource collection at a later point in order to achieve async loading of its items.

We are currently working on improving how the RadAutoCompleteBox control behaves when implementing scenarios like load on demand, populate with delay etc. The mentioned improvements will effect the described SuggestAppend AutoCompleteMode issue.

The control improvements should be available in our next official release of Telerik UI for WPF.

Regards,
Vladi
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Eric
Top achievements
Rank 1
answered on 27 Jun 2014, 01:05 PM
Hi Team!

We are using Telerik 2014.1.331.40 version, Is it possible in this verstion to have paging or load on demand feature with RadAutoCompleteBox control same like RadComboBox for ASP.NET ? We used that control in ASP.NET project and our client demanding the same behaviour in WPF, In wpf we use RadAutoCompleteBox but we are unable to achieve load on demand feature, and we didn't add header in DropDownItemTemplate. We have thousands of records to show in an autocompletebox which takes a lot of time to load, but we do not filter records on server side. When scroll-bar is press down next records retrieved automatically from service, same look and feel like RadComboBox of ASP.NET. Snapshot is attached same features we want in WPF.



0
Vladi
Telerik team
answered on 30 Jun 2014, 11:29 AM
Hello Eric,

Unfortunately the described retrieving of data when the scroll bar of the ScrollViewer in the DropDown of the control is moved is not possible in the current version of the control. The DropDown portion of the control is populated with the already generated collection by the FilteringBehavior of the control and it is not possible that those items are retrieved dynamically.

You can take a look at the project which Ivo attached to his previous response which demonstrates how load on demand could be implemented. The example demonstrates how the SearchTextChanged event could be used in order to trigger a custom implementation or a service call that retrieves a collection which is set as ItemsSource of the control. Hope this is helpful.

Regards,
Vladi
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Vitalij
Top achievements
Rank 1
answered on 16 Apr 2015, 01:52 PM
Hi, we are implementing RadAutoCompleteBox for selection from very large dataset, which can not be loaded all at once because of memory issues. Ivo's example was quite helpful, but we need a solution to fit MVVM pattern and all data loading and filtering should be done in viewmodel without any code behind in a view. Two way binding on SearchText property turns out to be unreliable sometimes. Could you please provide some example that demonstrate this kind of scenario?
0
Vladi
Telerik team
answered on 20 Apr 2015, 08:19 AM
Hi Vitalij,

By taking advantage of our EventToCommandBehavior it is possible to achieve a closer MVVM approach when using the sample project Ivo send as a base project. What could be done in order to move all of the code behind logic from that example into a view model is to:
  • Create an collection of business objects in the view model and bind it to ItemsSource of the control
  • Create a custom Command in the view model that will be triggered when the RadAutoCompleteBox SearchTextChanged event is raised
  • Use the EventToCommandBehavior in order to bind the custom command to the EventName="SearchTextChanged"
  • Bind the CommandParameter of the new EventBinding to the RadAutoCompleteBox control itself
  • Move all of the logic from the SearchTextChanged event handler in Ivo's example to the custom commands Executed method

I create a sample project of the described approach for you, hope it is helpful.

Regards,
Vladi
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
0
Vitalij
Top achievements
Rank 1
answered on 21 Apr 2015, 11:27 AM
Thank you very much, I've completely forgot about the EventToCommandBehavior.
Tags
AutoCompleteBox
Asked by
Raman
Top achievements
Rank 1
Answers by
Ivo
Telerik team
Emmanuel
Top achievements
Rank 1
Vladi
Telerik team
Eric
Top achievements
Rank 1
Vitalij
Top achievements
Rank 1
Share this question
or