The requested page is not available for the requested platform. You are viewing the content for Default platform.

ASPxClientEdit.GotFocus Event

Fires on the client side when the editor receives input focus.

Declaration

GotFocus: ASPxClientEvent<ASPxClientEventHandler<ASPxClientEdit>>

Event Data

The GotFocus event handler receives an argument of the ASPxClientEventArgs type.

Remarks

An editor's GotFocus event is fired on the client when moving focus to the editor from another control within the same page. Use the GotFocus event to perform specific actions (for instance, to prepare the editor object to receive input from a user) when the editor obtains focus.

An editor raises the ASPxClientEdit.LostFocus event when it loses focus.

Example

protected void Page_Init(object sender, EventArgs e) {
    ASPxDateEdit dateEdit = new ASPxDateEdit();
    dateEdit.ID = "ASPxDateEdit1";
    form1.Controls.Add(dateEdit);
    dateEdit.ClientInstanceName = "dateEdit";
    dateEdit.ClientSideEvents.GotFocus = "function (s, e) {  setTimeout(function() { s.ShowDropDown();}, 100);}";
}
See Also