Skip to main content

ASPxClientEdit.GotFocus Event

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

Declaration

GotFocus: ASPxClientEvent<ASPxClientEventHandler<ASPxClientEdit>>

Event Data

The GotFocus event's data class is ASPxClientEventArgs.

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