Skip to main content
All docs
V24.2

ASPxClientGridKeyboardEventArgsBase.handled Property

Specifies whether to suppress the keyboard key’s default action.

Declaration

handled: boolean

Property Value

Type Description
boolean

true to suppress the key’s default action; otherwise, false.

Remarks

The enabled handled property allows the control not to perform the key’s default action after custom actions specified in the event handler.

In the following example, ASPxGridView in batch edit mode switches focus from the selected grid cell to the cell below when a user presses the Enter key (the integer key code is 13):

var enterKeyCode = 13;

function onKeyDown(s, e) {
    var focusedCellInfo = s.batchEditApi.GetFocusedCell();
    if (e.keyCode == enterKeyCode) {
        s.SetFocusedCell(focusedCellInfo.rowVisibleIndex + 1, focusedCellInfo.column.visibleIndex);
        e.handled = true;
    }
}
<dx:ASPxGridView ID="grid" runat="server" ...>
    <ClientSideEvents KeyDown="onKeyDown" />
    <SettingsEditing Mode="Batch" />
    <Columns>
        <dx:GridViewDataColumn FieldName="ShipName" />
        <!--...-->
    </Columns>
</dx:ASPxGridView>
See Also