Introduction 

Oracle APEX Interactive Grids are highly flexible for managing data, but sometimes you need to customize the toolbar by hiding default buttons like “Edit,” “Save,” or “Add Row.” This can be useful to streamline the interface, improve security, or create a more guided workflow. In this article, we will show you how to achieve this customisation using JavaScript and dynamic actions in Oracle APEX. 

Why we need to do : 

Using JavaScript to Hide Toolbar Buttons 

You can hide default toolbar buttons in Oracle APEX Interactive Grids by manipulating the action framework with JavaScript. Here is a simple example to hide “Edit,” “Save,” and “Add Row”: 

Make sure ontoor matches the Static ID of your Interactive Grid. If it’s different, replace it with the correct Static ID. 

How do we solve: 

Implementation Guide: Step-by-Step Instructions 

Here’s how to implement the JavaScript code to hide toolbar buttons in Oracle APEX Interactive Grids: 

Step 1: Assign a Static ID to the Interactive Grid 

To reference your Interactive Grid in JavaScript, it needs a Static ID: 

  • Open Oracle APEX: Navigate to the page containing your Interactive Grid in the Application Builder. 
  • Assign a Static ID: In the “Attributes” section, assign a unique Static ID, like “ontoor.” 

Step 2: Create a Dynamic Action to Execute JavaScript 

To ensure the JavaScript code runs on page load, create a dynamic action: 

Create a New Dynamic Action: 

  • Go to the “Dynamic Actions” section in Oracle APEX and click “+” to create a new dynamic action. 
  • Set the Event to “Page Load.” 
  • Give the dynamic action a descriptive name, such as “Hide Toolbar Buttons.” 

Add JavaScript to Hide Toolbar Buttons: 

  • Click “+” to add an action. 
  • Set the action type to “Execute JavaScript.” 
  • Paste the JavaScript code snippets to hide the “Edit,” “Save,” and “Add Row” buttons. 

Step 3: Test Your Changes 

After creating the dynamic action and adding the JavaScript code, test the Interactive Grid to ensure the buttons are hidden and the grid functions as expected. 

After 5 Seconds : 

Conclusion : 

Hiding default toolbar buttons in Oracle APEX Interactive Grids can simplify the user interface, improve security, or guide users through a specific workflow. By following this guide, you can customize the Interactive Grid’s toolbar to meet your needs. If you encounter issues, refer to the troubleshooting tips to resolve common problems. 

Recent Posts

Start typing and press Enter to search