Skip to main content
All docs
V23.2

ASPxClientGridKeyboardEventArgsBase.isShiftPressed Property

Specifies whether a user presses the Shift key when the event occurs.

Declaration

isShiftPressed: boolean

Property Value

Type Description
boolean

true if the Shift key is pressed when the event occurs; otherwise, false.

Remarks

In the example below, ASPxGridView allows users to press the custom Shift+Space shortcut (the Space key’s integer code is 32) to collapse all expanded group rows.

var spaceKeyCode = 32;

function onKeyDown(s, e) {
    if (e.isShiftPressed && e.keyCode == spaceKeyCode) {
        s.CollapseAll();
    }
}
<dx:ASPxGridView ID="grid" runat="server" ...>
    <Settings ShowGroupPanel="true" />
    <ClientSideEvents KeyDown="onKeyDown" />
    <Columns>
        <dx:GridViewDataColumn FieldName="ShipName" />
        <!--...-->
    </Columns>
</dx:ASPxGridView>
See Also