Customizing the Interactive Grid: Actions & Toolbar Enhancements in Oracle APEX

Tweaking Grid


Oracle APEX Interactive Grid (IG) provides a rich set of default actions and menus. While powerful, not all applications require every built-in feature. To deliver a cleaner and more controlled user experience, Oracle APEX allows developers to remove standard actions and add custom actions using JavaScript configuration.

This section explains Tweak #3 and Tweak #4 from the Interactive Grid customization techniques.



Tweak the Action Menu – Remove Default Actions

By default, the Interactive Grid action menu includes several options such as sorting, filtering, aggregations, and help dialogs. In many enterprise applications, these options may be unnecessary or even confusing for end users.

Why Remove Default Actions?

  • Simplifies the UI

  • Prevents unauthorized data manipulation

  • Improves usability for business users

  • Aligns the grid with application-specific requirements

Remove Default Actions Using initActions

Oracle APEX allows hiding or disabling default actions during grid initialization.

Example Code:

function (options) { options.initActions = function (actions) { actions.hide("show-columns-dialog"); actions.hide("show-control-break-dialog"); actions.hide("show-aggregate-dialog"); actions.hide("show-help-dialog"); actions.hide("show-sort-dialog"); actions.hide("refresh"); actions.disable("chart-view"); }; return options; }

Explanation:

  • actions.hide() removes menu options from the UI

  • actions.disable() keeps the option visible but inactive

  • This ensures users only see relevant features

Disable Features at Grid Level

Instead of hiding menu actions individually, features can be disabled directly.

function (options) { options.features = options.features || {}; options.features.filter = false; options.features.flashback = false; return options; }

Benefit:

  • Cleaner configuration

  • Prevents feature availability entirely

  • Ideal for read-only or controlled grids

 Tweak the Action Menu – Add Custom Actions

Beyond removing default actions, Oracle APEX allows developers to add custom toolbar buttons and link them to custom business logic.

Why Add Custom Actions?

  • Trigger application-specific logic

  • Integrate with Dynamic Actions

  • Enhance productivity with one-click operations

  • Maintain consistency with business workflows

Add a Custom Button to the Toolbar

function (options) { var $ = apex.jQuery, toolbarData = $.apex.interactiveGrid.copyDefaultToolbar(), toolbarGroup = { id: "myToolBarGroup", controls: [{ type: "BUTTON", action: "my-custom-action", label: "My Button", icon: "fa fa-user-secret", iconBeforeLabel: true }] }; toolbarData.push(toolbarGroup); options.toolbarData = toolbarData; return options; }

Explanation:

  • Copies the default toolbar

  • Adds a new toolbar group

  • Defines a custom button with icon and label

Link Custom Action to the Button

function (options) { options.initActions = function (actions) { actions.add({ name: "my-custom-action", action: function (event, element) { apex.event.trigger(element, "my-custom-action"); } }); }; return options; }

How This Works:

  • Registers a custom action

  • Triggers a custom event

  • The event can be handled using a Dynamic Action


Summary

Customizing the Interactive Grid action menu by removing unnecessary default actions and adding tailored custom actions allows developers to transform a generic grid into a purpose-driven business component. These tweaks significantly enhance usability, security, and alignment with real-world workflows in Oracle APEX applications.



Comments

Popular posts from this blog

Converting your Spreadsheet into a Cloud App using Oracle APEX

Building a Wizard-Based Application in Oracle APEX

Payment Gateway in Oracle APEX using Razorpay