E
Every release I scan the APEX Ideas App implementations to see which long-standing requests finally landed. In 26.1 three of them are about the Interactive Grid, and together they add up to one thing: the editable grid now behaves much more like a spreadsheet. If you build data-entry screens, this is the upgrade you actually feel.
So let me walk through what changed and where the sharp edges are.
Copy, cut, paste, paste-insert
The editable Interactive Grid now supports the full clipboard set you expect from a spreadsheet:
- Copy – puts the selected cells on the clipboard
- Cut – copies, then clears the cells
- Paste – overwrites the target cells with what is on the clipboard
- Paste Insert – creates new rows and drops the clipboard data into them
It works within one grid, between two different grids on the page, and from an external spreadsheet. Multi-row and multi-column selections all come along. Copy was already there before, but this release rounds out the rest, so a user can finally select a block in Excel and paste it straight into your grid.
One detail that trips people up: these clipboard actions fire when you are navigating the grid, not while you are inside a cell editor. So you select cells, then paste, rather than clicking into a field first.
Drag and drop from a spreadsheet
If clipboard permissions are a hassle in your environment, there is a second path. You can drag a range of cells out of Excel, or any program that supports drag and drop of tabular data, and drop it onto the grid. Same multi-cell behavior, no clipboard prompt. Handy for a quick bulk load during data entry.
Copy got more selective
This is the part I like. Copy got more selective and more useful at the same time:
- Empty virtual columns, including the Actions button, are no longer copied. The selection row header stays out unless it has text.
- Links copy as links when the column has a URL property or a "linkTargetColumn", and paste restores them as links too.
- You can now copy things that used to be off limits, read-only cells, header and group-header rows, aggregate rows, and control break rows.
So a copy of your grid pasted into an email or a sheet looks like the report, not a wall of stray button columns.
Cell selection finally has keyboard shortcuts
In Cell Selection mode you get the shortcuts your fingers already expect:
- Ctrl+Space selects the whole column
- Shift+Space selects the whole row
- Ctrl+A (or Cmd+A on a Mac) selects everything
Row selection headers can't be selected, range selections can include aggregate rows, and inserting a record in this mode now drops the new row right after the current one instead of somewhere surprising. With virtual scroll pagination, selecting cells that aren't loaded yet triggers the Load All link, the same way row selection already did.
The gotchas
This is APEX, so a few conditions apply, and it is better to know them before a user files a ticket.
- Your app must run over https. Clipboard access is blocked on plain HTTP.
- The browser may still ask the user for clipboard permission the first time.
- Paste only works when the source puts tabular data on the clipboard in a format APEX understands. A random text blob won't map cleanly.
- You own the data validation. Numbers pasted into a number column are fine, but select lists and LOV columns are tricky, because the display value a user copies is not the stored value underneath. Paste the label "Active" into a status column keyed on 1 and you will see why.
For developers: easier to customize
A couple of changes are aimed squarely at us, not the end user. The Insert and Delete keys now route through the grid actions "selection-add-row" and "selection-delete", which makes it safer to hook your own logic onto those actions. If you already drive the grid from custom buttons, you call the same actions:
// delete the selected rows from a custom toolbar button
apex.region("MASTER_BID_ITEMS").widget()
.interactiveGrid("getActions").invoke("selection-delete");
This is the pattern I lean on for unified grid toolbars, which I wrote up in Unified grid buttons and Save/process all selected rows on Grid. With Insert and Delete going through the same actions, those customizations get more predictable.
There is also a progress spinner now when a bulk operation, copy down, fill, clear or paste, takes a while, so a big paste no longer looks like a frozen page. And if you use the "rowHeader" JavaScript option for a sequence column, it now fills in a value for inserted records and renumbers on insert and delete. The full method list lives in the interactiveGrid JS API docs. If you want a refresher on keeping grids tidy, my APEX interactive grids health check still holds up.
Happy ending?
Open one of your editable grids on 26.1, select a block, and paste it into a spreadsheet to see what comes across now. If this saved you a support ticket, pass it on to a colleague who runs data-entry screens.
Will users stop exporting dta to Excel and importing it back? Not likely.
Comments
Post a Comment