By using keyboard shortcuts, you can save your time and increase efficiency. Spread for WinForms provides ExcelCompatibleKeyboardShortcuts property which when set to true, allows you to use Excel-compatible keyboard shortcuts.
The below table lists the Excel-compatible keyboard shortcuts:
Shortcut | Description |
---|---|
Ctrl+` | Toggle between displaying formulas in cells and displaying calculated values as in Excel |
Ctrl+1 | Show "Format Cells" dialog |
Ctrl+Shift+F5 | Show card (for .NET data object) |
Ctrl+K | Show Insert Hyperlink dialog |
Ctrl+Enter | Input data for multiple cells |
Tab |
Move to the next cell at the right In case of a table, if active cell is in the last column of table
|
Shift + Tab |
Move the active cell to the previous cell at the left If the active cell is in the first column of table, move to the last cell of previous row (or the last cell of the last row if current row is the first) |
Ctrl + A |
Select neighbor cells, then worksheet on each subsequent use of Ctrl+A If the cell belongs to Table, select table data range, then table range, then worksheet on each subsequent use of Ctrl+A |
Ctrl + Shift + "+" | Insert cut or copied cells |
The below example code sets ExcelCompatibleKeyboardShortcuts property to true which allows you to use above mentioned shortcuts.
C# |
Copy Code
|
---|---|
// Set ExcelCompatibleKeyboardShortcuts features to true fpSpread1.Features.ExcelCompatibleKeyboardShortcuts = true; // Set value in Cells fpSpread1.ActiveSheet.Cells["A1"].Value = 10; fpSpread1.ActiveSheet.Cells["B1"].Value = 20; // Set formula in Cell fpSpread1.ActiveSheet.Cells["C1"].Formula = "SUM(A1: B2)"; |
VB |
Copy Code
|
---|---|
' Set ExcelCompatibleKeyboardShortcuts features to true fpSpread1.Features.ExcelCompatibleKeyboardShortcuts = True ' Set value in Cells fpSpread1.ActiveSheet.Cells("A1").Value = 10 fpSpread1.ActiveSheet.Cells("B1").Value = 20 ' Set formula in Cell fpSpread1.ActiveSheet.Cells("C1").Formula = "SUM(A1: B2)" |