It's well known that the keyboard can be an efficient input method, requiring less movement and effort than a mouse. If you're entering data into a form and the mouse is required to move focus between fields, then efficiency is reduced when you need to frequently switch between the keyboard and mouse. To improve productivity, your application form should let the user accomplish some tasks by hitting a combination of two or three keys at the same time. In APEX, users can fill a form using only the keyboard by hitting the Tab key to move focus between fields. But, what about if your users are working with an Interactive Grid? Is it possible to add, delete or update rows in an Interactive Grid using just the keyboard? The answer is, yes! Let's try it!
To accomplish this, you need to become familiar with the predefined actions included in the Interactive Grid widget, such as, delete, row-add-row or save. This widget introduced with APEX version 18.2, is a modern component combining powerful reporting features with easy multi-row editing.
|row-add-row||Insert a row straight after the current row||Alt + A|
|row-delete||Delete the current row||Alt + D|
|save||Save the current data changes. Note: Interactive Grid must be editable||Alt + S|
|refresh||Refresh the Interactive Grid region||Alt + R|
|reset-report||Reset the current report settings||Alt + C|
|focus||Focus on Interactive Grid's Search Bar. This action is not included in the widget.||Alt + F|
When the page is rendered, it's easier for users if the cursor focus is already on the Interactive Grid. This way, users can easily add/ update/delete rows by entering the pre-defined shortcuts. Follow these steps to focus the cursor in your Interactive Grid:
Next, in case that your Interactive Grid includes display-only columns, it would be better to skip those columns when you're editing the grid. If users enter Tab or Shift-Tab, it can skip over those columns and focus on columns which aren't read-only. You can use the skipReadonlyCells advanced grid option.
Keep in mind that the focus action described in the above table is not included in the widget, so you will need to create this particular action and then add the shortcut to trigger the focus action.
Follow these steps to skip read-only columns, create the focus action, and add your customized shortcuts for every action defined in the table.
Note: You can define your own keyboard shortcut which best suit your users, keeping in mind the operating system and language.
There are other keyboard shortcuts already implemented in the Interactive Grid, such as:
|To move through the IG using the arrows keys||Esc|
|Edit the column||Enter / F2|
Review how to work with an Interactive Grid using all the shortcuts:
The APEX version used in this example is version 20.1.0.00.13.