SpreadsheetControl.AssignShortcutKeyToCommand(Keys, Keys, SpreadsheetCommandId) Method

Assigns a shortcut key to a command.

Namespace: DevExpress.Xpf.Spreadsheet

Assembly: DevExpress.Xpf.Spreadsheet.v21.1.dll


public void AssignShortcutKeyToCommand(
    Keys key,
    Keys modifier,
    SpreadsheetCommandId commandId


Name Type Description
key Keys

A Keys enumeration member specifying a key to assign.

modifier Keys

A Keys enumeration member specifying a modifier key.

commandId DevExpress.XtraSpreadsheet.Commands.SpreadsheetCommandId

A DevExpress.XtraSpreadsheet.Commands.SpreadsheetCommandId enumeration member specifying a command.


The SpreadsheetControl’s shortcuts should be assigned after the control is initialized.

To remove a command shortcut, use the SpreadsheetControl.RemoveShortcutKey method.

See Also