Skip to main content
All docs
V25.1
  • ASPxClientGridKeyboardEventArgsBase.isAltPressed Property

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

    Declaration

    isAltPressed: boolean

    Property Value

    Type Description
    boolean

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

    Remarks

    In the example below, ASPxGridView allows users to press the custom Alt+Left Arrow and Alt+Right Arrow shortcuts to switch pages.

    function onKeyDown(s, e) {
        if (e.isAltPressed) {
            switch (e.htmlEvent.key) {
                case "ArrowRight":
                    s.NextPage();
                    break;
                case "ArrowLeft":
                    s.PrevPage();
                    break;
            }
        }
    }
    
    <dx:ASPxGridView ID="grid" runat="server" ...>
        <ClientSideEvents KeyDown="onKeyDown" />
        <Columns>
            <dx:GridViewDataColumn FieldName="ShipName" />
            <!--...-->
        </Columns>
    </dx:ASPxGridView>
    
    See Also