Shortcuts
Summary
- Shortcuts ensure that numeric data is edited accurately and quicky into AG Grid
- They allow users to avoid "fat finger" issues when editing data quickly
- They consist of 4 main elements:
- Which Columns can accept the Shortcut
- What key will apply the Shortcut
- What Operation will be applied when the Key is pressed
- What Value will be applied
- This allows users to provide a Shortcut where clicking 'M' in a Price column will multiply by 1000
Shortcuts ensure that numeric data is edited accurately and quicky into AG Grid.
Each Shortcut consists of an alphabet keystroke which when entered into a numeric cell automatically converts into a mathemetical operation using the existing cell contents.
- This demo has 2 Shortcuts defined:
- All
numericcolumns will multiply by 1,000 when k is clicked - The
Github Starscolumn will increment by 1 when p is clicked
- All
Expand to see the Shortcut Definitions
- Double-click any numeric cell to start editing it and then type
kto multiply by1.000 - Double-click a cell in the
GitHub Starscolumn to start editing it and then typepto add1
Applying Shortcuts
Shortcuts are applied by pressing the key identified as the ShortcutKey in a Shortcut in a numeric cell editor.
AdapTable will check if the key press is a valid Shortcut and, if it is, perform the mathematical calculation.
For example, a Shortcut of k with an operation of Multiply by 1000 would convert an initial cell value of 5 into 5,000 if the k key is pressed on the keyboard.
Creating Shortcuts
Shortcuts can be managed at runtime via the Shortcut section of the Settings Panel.
This lists the details of all existing Shortcuts in Adaptable State together with options to:
- create (via the Shortcut Wizard)
- edit (via the Shortcut Wizard)
- delete
- suspend
- share (if Team Sharing is running)
UI Step by Step Guide
Using the Shortcut Wizard
Shortcuts with an Entitlement of ReadOnly can be applied but Users cannot manage or suspend them.
Configuring Shortcuts
Shortcuts can be provided at design-time through Shortcut Initial Adaptable State.
Developer Guide
Providing a Shortcut in Initial Adaptable State
Shortcuts in Row Forms
Row Forms are dynamically-created by AdapTable, designed for safe, controlled AG Grid data editing.
Any defined Shortcuts will also be operative in the numeric input in the Row Form.
- This demo has a Shortcut defined for
numericcolumns - multiply by 1 Million when M is clicked - An
EditAction Colummn Command Button has been provided (which opens an Edit Row); the Shortcut is available in this form also
- Click the Edit button to open the Edit Form
- Type
Minto a numeric cell and not how it multiplies the input's value by 1 Million
FAQ
Can we apply shortcuts on non-numeric columns? No, Shortcuts only work for numeric columns.
Can we apply shortcuts on multiple columns simultaneously? No, Shortcuts work by intercepting a cell edit and only one cell in AG Grid can be edited at a time. Use Smart Edit or Bulk Update to update multiple cells.
Can I use Shortcut to bypass Data Validation? No, Shortcuts will not be allowed by AdapTable if the result breaks a Data Validation Rule.
Do Shortcuts operate in Row Forms? Yes you can use Shortcuts while editing data using a Row Form