Skip to main content
All docs
V23.2

ASPxClientGridKeyboardEventArgsBase.isCtrlPressed Property

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

Declaration

isCtrlPressed: boolean

Property Value

Type Description
boolean

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

Remarks

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

var spaceKeyCode = 32;

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