DropDownList Filter Search Focus

Hi,

is there a way to dynamically set focus to the filtersearch textbox when it's set to true?


Thank you  

1 Reply

KC Kasithangam C Syncfusion Team July 4, 2016 09:38 AM UTC

Hi Pratura, 
 
Thanks for using Syncfusion Products. 

Yes, we can set focus to the filtersearch textbox by overwrite the popupShown function as shown below code: 

<code> 
<script> 
        $(function () { 
            var obj = $("#<%=selectCar.ClientID%>").data("ejDropDownList"); 
            var srcFunction = obj._OnPopupHideShow; 
             obj._OnPopupHideShow = function (e) { 
                //This is the overwrite popupshown function and set focus to the filtersearch textbox in dropdown 
 
                srcFunction.call(this, e); 
  $(obj.inputSearch).focus();             
} 
        }); 
    </script> 
</code> 

It will set focus when the popup is opened. We have prepared the sample based on this and please find the sample from the following location: 

Sample: Sample 
Please let us know if you have further query. 
Regards, 
Kasithangam 


Loader.
Up arrow icon