New to Telerik UI for ASP.NET AJAXStart a free 30-day trial

Focus the RadComboBox

Set the focus on the client

To focus RadComboBox on the client, you should follow the steps below:

  • Get the client-side instance of RadComboBox;

  • Get the DOM element of the input field;

  • Focus the input field.

JavaScript
	
function SetFocus() {
    var comboBox = $find("<%=RadComboBox1.ClientID %>");
    var input = comboBox.get_inputDomElement();
    input.focus();
}
	

Set the focus on the server

Use the SetFocus method of the ScriptManager or RadScriptManager.

C#
	     
RadComboBox1.Focus();
				

The focus of RadComboBox might not be visible in some browsers if AllowCustomText property is not set to true. You could test the focus using the OnClientFocus event.

See Also