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 |
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)" |