Automatic aropdown after setting default text

3 posts, 0 answers
  1. Bernie
    Bernie avatar
    27 posts
    Member since:
    Apr 2008

    Posted 07 Aug 2014 Link to this post


    I'm setting the default text in the radsearchbox serverside. how can I perform a automatic dropdown with search results of the radsearchbox?

    is it possible to trigger the ondatarequest event with javascipt?

    Thank you!

  2. Boyan Dimitrov
    Boyan Dimitrov avatar
    1966 posts

    Posted 12 Aug 2014 Link to this post


    Straight to your questions:

       1. In order to show a filtered results in the drop down after you set the RadSearchBox text on the server I would suggest the following approach:
    <script type="text/javascript">
        //Put your JavaScript code here.
        function pageLoad() {
            var searchBox = $find("<%= RadSearchBox1.ClientID %>");
            var text = searchBox.get_text();
            if (text != "") {
    <telerik:RadSearchBox ID="RadSearchBox1" runat="server"></telerik:RadSearchBox>

       2. Using the RadSearchBox client-side method _requestItems(text) as shown above will make a request to the server in order to retrieve the result set based on the text value set as parameter.

    Boyan Dimitrov

    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. Bernie
    Bernie avatar
    27 posts
    Member since:
    Apr 2008

    Posted 12 Aug 2014 in reply to Boyan Dimitrov Link to this post

    That works great!

    Thank you!
Back to Top