Populate and display dropdown on page load

3 posts, 1 answers
  1. Francois MARTIN
    Francois MARTIN avatar
    44 posts
    Member since:
    Aug 2005

    Posted 19 Sep 2014 Link to this post

    Hello Folks,

    I do know that the AutoCompleteBox has been designed to display its DropDown upon a user entry and not before. But this behavior does eventually create a little confusion when the user has no idea what the possibilities are. Therefore I would like to achieve the following functionality:

    1. Populate the dropdown immediately with a maximum of 100 elements
    2. Display the dropdown at load time after being populated with the 100 elements
    3. Upon user entry, the filtering should happen on all possible elements, not only the 100 elements that were preloaded

    I am aware that the RadComboBox with the LoadOnDemand event could come close to the solution,... but close isn't enough. I would really like to use the AutoCompleteBox. Any idea how to achieve this ?

  2. Answer
    Nencho avatar
    1661 posts

    Posted 23 Sep 2014 Link to this post

    Hello Francois,

    I would suggest you to use a WebService to bind the RadAutoComplteBox with data and use the private method _requestItems("") at page load (at client-side). Thus you will manually initiate request to the web service and populate the control initially with the needed data. This approach will provide you with the ability to customize the queries to the database and return the needed results  - initially 100 and then filtering against the entire datasource.

    In addition in the attachment you could find a simple project, demonstrating the implementation of the above suggestion. The thing you need to modify is the access to your database and the needed filtering.


    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.

  3. Francois MARTIN
    Francois MARTIN avatar
    44 posts
    Member since:
    Aug 2005

    Posted 23 Sep 2014 in reply to Nencho Link to this post

    Brilliant, this is exactly what I was looking for!
    Thank you.
Back to Top