Smart Edit
Summary
- Smart Edit applies a single mathematical edit to numerous, numeric cells
- The Operation can be either:
- one of the 4 System Smart Edit Operations provided by Adaptable
- a Custom Smart Edit Operation supplied by a developer at design time
Smart Editing enables multiple, contiguous numeric cells to be updated with a single mathematical operation.
The System Smart Edit Operations - supplied by AdapTable - are:
- Addition
- Subtraction
- Multiplication
- Division
For example a Smart Edit value of 10 with an operation of Multiply, will multiply all selected cells by 10.
Applying Smart Edit
Smart Edits can be applied in 3 places in AdapTable:
- Smart Edit Toolbar
- Smart Edit Tool Panel
- Smart Edit page in the Settings Panel
Hint
The Smart Edit Settings Panel page can also be opened by selecting Apply Smart Edit in the Context Menu
UI Step by Step Guide
Applying a Smart Edit
- Select editable numeric cells in a single column, then use Smart Edit on the toolbar to apply an operation (the demo uses multiply by 10)
- Click the Green tick in the Smart Edit toolbar to multiply the selected values by 10
Custom Smart Edit Operations
Developers can provide Custom Smart Edit Operations in addition to those shipped by AdapTable.
This is done via the smartEditCustomOperations property in the smartEditOptions section of Edit Options.
smartEditCustomOperations
- This example includes 2 Custom Smart Edit Operations:
Power- which pows the selected cell by the Smart Edit Valuebps- which adds the Smart Edit Value as Basis Points
- Note: we have used methods in Smart Edit API to set the Smart Edit Operation to
Power
Deep Dive
Smart Edit and Data Validation
FAQ
Can I use Smart Edit to bypass Prevent Edit Alerts? No, Smart Edit is aware of Data Validation rules and will warn or prevent you as applicable if one is breached.
Can I run a Smart Edit across multiple columns if they are all numeric? No, Smart Edit can only be used on a single column at at time, to ensure that Data Validation rules are adhered to.
My column contains strings in some cells and numbers in others. Can I use Smart Edit on the numeric cells? No, Smart Edit only works where the entire Column is identified as Numeric.
Can I create custom Smart Edit rules (e.g. to move by bps or other amounts)?
Yes — provide operations in smartEditCustomOperations on Edit Options (see Custom Smart Edit Operations above).
I don't want to use a formula to update the cell, I just want to replace the current value with a new one? You can use Bulk Update to replace the cell value with a new one entirely.