We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Setting text focusOut Event

Thread ID:





124432 Jun 9,2016 12:14 PM UTC Jun 16,2016 05:11 AM UTC JavaScript 3
Tags: ejAutoCompleteTextBox
Asked On June 9, 2016 12:14 PM UTC


I am using ej.ejAutocomplete control, it works good but I have a small problem.

If the user selects an item from suggestion popup list, I store the selected item in a local variable. 

The problem that I have is;
If the user removes a part of the text in autocompleteTextbox, I would like to set the text again on focusOut event, from tha local variable that I stored.

Here is the use case:
  1. User searches Departments
  2. Select "Development" Department from popup => selected item is saved in local variable on "select" event
  3. User deletes some text using backspace button and leave it like "Develo"
  4. OnFocusOut event, the text of textbox should be set to "Development" again (from selectedDepartment.name)


Narayanasamy Panneer Selvam [Syncfusion]
Replied On June 10, 2016 10:51 AM UTC

Hi Tolga,   
Thanks for Contacting Syncfusion support.  
We can achieve your requirement by using our existing events like “Select” and “focusOut” events and by declaring the variable as global, in which you want to store your selected value. Please refer the below code example.  
Code example:   
Global declaration:   
var store;   
                     dataSource: carList,   
                  select: function (argument) {   
                    store =(argument.text);   
                focusOut: function (argument) {   
                    $("#selectCar").ejAutocomplete("selectValueByText", store);   
Please find the code sample in the below link.   
Narayanasamy P.   

Replied On June 15, 2016 07:27 AM UTC

Thanks.. it works..

Narayanasamy Panneer Selvam [Syncfusion]
Replied On June 16, 2016 05:11 AM UTC

Hi Tolga, 
We are glad that the suggested solution worked for you.  
Let us know if need further assistance. 
Narayanasamy P. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon