Pageable RadAutoCompleteBox?

9 posts, 0 answers
  1. Micro
    Micro avatar
    2 posts
    Member since:
    Mar 2010

    Posted 11 Jun 2013 Link to this post

    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.
  2. Ivo
    Admin
    Ivo avatar
    390 posts

    Posted 17 Jun 2013 Link to this post

    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.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Emmanuel
    Emmanuel avatar
    8 posts
    Member since:
    Sep 2013

    Posted 14 May 2014 Link to this post

    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,

  5. Vladi
    Admin
    Vladi avatar
    744 posts

    Posted 16 May 2014 Link to this post

    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.
     
  6. Eric
    Eric avatar
    7 posts
    Member since:
    Aug 2010

    Posted 27 Jun 2014 Link to this post

    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.



  7. Vladi
    Admin
    Vladi avatar
    744 posts

    Posted 30 Jun 2014 Link to this post

    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.
     
  8. Vitalij
    Vitalij avatar
    35 posts
    Member since:
    Dec 2010

    Posted 16 Apr 2015 in reply to Vladi Link to this post

    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?
  9. Vladi
    Admin
    Vladi avatar
    744 posts

    Posted 20 Apr 2015 Link to this post

    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.

     
  10. Vitalij
    Vitalij avatar
    35 posts
    Member since:
    Dec 2010

    Posted 21 Apr 2015 in reply to Vladi Link to this post

    Thank you very much, I've completely forgot about the EventToCommandBehavior.
Back to Top
UI for WPF is Visual Studio 2017 Ready