RadControls for ASP.NET AJAX
Set the focus on the client
To focus RadComboBox on the client, you should follow the steps below:
CopyJavaScript
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.
CopyC#
ScriptManager1.SetFocus(RadComboBox1.ClientID + "_Input");
CopyVB.NET
ScriptManager1.SetFocus(RadComboBox1.ClientID + "_Input")
Note |
|---|
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