1. Overview
This document will be helpful to add shortcut key for Add row and filter in Interactive Grid.
2. Technologies and Tools Used
The technology used is
JavaScript
3.Architecture
Steps
We can achieve this by using JavaScript function in the apex page. The step by step process to achieve this is as follows
Step 1:
Create an Interactive Grid with a base query.
Step 2:
Add the following code into the Interactive grid region attribute –> Javascript Initialization Code.
function(options)
{
options.defaultGridViewOptions={
skipReadonlyCells:true
};
options.initActions = function( actions ) {
actions.add( {
name: “my-action”,
label: “Hello”,
action: function( event, focusElement ) {
var ig$=$(actions.context);
ig$.interactiveGrid(“my-action”);
return true;
}
} );
actions.lookup( “row-add-row” ).shortcut = “Alt+R”;
actions.update( “row-add-row” );
actions.lookup( “show-filter-dialog” ).shortcut = “Alt+F”;
actions.update( “show-filter-dialog” );
}
return options;
}
Output: