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

Set Focus to an angular DropDownList

Thread ID:





119368 Jun 11,2015 10:05 AM UTC Jun 12,2015 02:09 PM UTC JavaScript 1
Tags: ejDropDownList
Rob ONeill
Asked On June 11, 2015 10:05 AM UTC

I am trying to set the focus to a DropDownList when a partial view is loaded. It doesn't seem to get the focus. We are using an ng-include to return the partial view, and within that template html I need to set the focus to a dropdownlist contained within. Any thoughts ?

Cheers ... Rob.

Harikrishnan P [Syncfusion]
Replied On June 12, 2015 02:09 PM UTC

Hi Rob,

Thanks for using Syncfusion products. We have analyzed your query and prepared the sample based on your requirement .Please get the sample from below location


In this sample, we have maintained the dropdown list in page2.html which will load in main page using ng-include. The page will load when you click on the button in main page.
To set the focus to control, we have used ‘$includeContentLoaded’ event which will trigger after the ng-include src page loaded success fully.

Please refer the below code snippet

$scope.$on("$includeContentLoaded", function (event, templateName) {


if (($(".e-dropdownlist").length > 0))



Please check with the provided samples and let us know if it helps. If we misunderstood your queries, please provide more details about the requirement that will be easy for us to provide the exact solution



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