I tried to set a RadTextBox focus when the page loaded,but failed,why?
I used many of method
1.RadTextBox.Focus();
2.Page.SetFocus(RadTextBox.ClientID);
3.page.SetFocus(RadTextBox).
all failed.
who can help me? thanks.
You can achieve this either from server side or client side.
If you want to achieve this from client side, one approach is to get the client object of the RadTextBox and set the focus either in pageLoad or from ClientEvents-OnLoad of the RadTextBox. Here is a sample code.
Javascript:
functionpageLoad()
{
varradInput = $find("<%= RadInput1.ClientID %>");
radInput.focus();
}
functiononClientLoad(sender) // executes when loading the RadTextBox