Persist RadAutoCompleteBox text

4 posts, 0 answers
  1. Shweta
    Shweta avatar
    6 posts
    Member since:
    Apr 2014

    Posted 03 Apr 2014 Link to this post

      I want to persist the autoCompleteBox text after clicking outside of it.Is it possible? If yes, how?
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 03 Apr 2014 in reply to Shweta Link to this post

    Hi shewta,

    I guess that you want to show the text in the RadAutoCompleteBox after clicking outside. The default behavior of the control is that it will persist after clicking outside the RadAutoCompleteBox. Please check this online demo and try to replicate the issue in this demo.

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Shweta
    Shweta avatar
    6 posts
    Member since:
    Apr 2014

    Posted 03 Apr 2014 Link to this post

    Hi Princy,

    I want to persist the search text that I will write , not the selected text.
  5. Plamen
    Admin
    Plamen avatar
    2734 posts

    Posted 08 Apr 2014 Link to this post

    Hello,

    Here is the code that worked correctly at my side:
        <script type="text/javascript">
            Telerik.Web.UI.RadAutoCompleteBox.prototype._populateDropDown = function (data, itemsRendered, renderShowAllButton) {
                var dropDown = this._dropDown,
                    resultCount = data.length;
     
                if (data.length) {
                    dropDown.populate(data, itemsRendered);
     
                    if (!this.get_enableClientFiltering()) {
                        dropDown.open(this._getDropDownPositionInfo());
                    }
                } else {
                    this.clear();
                }
            }
        </script>
     
    <div>
        <telerik:RadAutoCompleteBox runat="server" ID="RadAutoCompleteBox1" AllowCustomEntry="true" InputType="Text">
        </telerik:RadAutoCompleteBox>
    </div>

    hope this will help you solve the issue.

    Regards,
    Plamen
    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.

     
Back to Top