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

Persist RadAutoCompleteBox text

3 Answers 86 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
Shweta
Top achievements
Rank 1
Shweta asked on 03 Apr 2014, 09:23 AM
  I want to persist the autoCompleteBox text after clicking outside of it.Is it possible? If yes, how?

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 03 Apr 2014, 11:11 AM
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.
0
Shweta
Top achievements
Rank 1
answered on 03 Apr 2014, 11:38 AM
Hi Princy,

I want to persist the search text that I will write , not the selected text.
0
Plamen
Telerik team
answered on 08 Apr 2014, 07:40 AM
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.

 
Tags
AutoCompleteBox
Asked by
Shweta
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Shweta
Top achievements
Rank 1
Plamen
Telerik team
Share this question
or