ASPxClientGridKeyboardEventArgsBase.keyCode Property
Gets a key code.
Declaration
keyCode: any
Property Value
Type | Description |
---|---|
any | An integer value. |
Remarks
The keyCode
property gets a pressed key code as an integer value.
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