Customizing the "Actions" Dropdown in APEX Interactive Grid

Is there a way to modify the choices available in the Selection section of a Row Actions Menu in Apex?

I managed to alter the options in the Line Menu, but I'm facing challenges when trying to make changes in the Selection Menu.

The Selection Menu is on the left & the Line Menu is on the right

https://i.sstatic.net/IX2HL.png

Answer №1

I managed to find a resolution for the editing issue I was facing. Here is the solution shared in case it could benefit someone else as well.

function(config) {
    config.initActions = function( actions ) {
        // Removes the "Single Row View" option
        actions.remove("single-row-view");
        actions.remove("selection-duplicate");
        actions.remove("selection-refresh");
    };
    return config;
}

Instead of using widget.disable, I utilized the remove action to eliminate specific fields from the Selection Menu.

https://i.sstatic.net/L3RkK.png

Edit: There are some new options introduced in APEX 18.2. Below are the codes I found to disable them. Still figuring out how to remove the "Fill" and "Clear" options. Hopefully, this information will be helpful for anyone looking to remove these choices.

The codes targeting the first two options shown here are:

actions.remove("selection-copy");
actions.remove("selection-duplicate");

I've tried using the "selection" prefix for the fill and clear options without success. If you have their codes, please share with me.

https://i.sstatic.net/mjl6N.png

Answer №2

Here is a suggestion to try:

  • Insert the provided code in the "Execute When Page Load" property at the Page Level

   

 $(function() {
    // Adding a new element to the selection action menu
    $("#emp_ig_selection_actions_menu").menu("option").items.push({
            type: "action",
            id: "irHello",
            hide: false,
            label: 'hello world',
            icon: 'fa fa-home',
            action: function() {
                alert("hello world");
            }
        });
    
 // Disabling items in the Menu  
 apex.region("emp").widget().interactiveGrid("getActions").disable("selection-duplicate");
        
 apex.region("emp").widget().interactiveGrid("getActions").disable("selection-revert");
    });

To learn more about how the Menu Widget functions, you can reference this documentation: https://docs.oracle.com/database/apex-18.2/AEXJS/menu.html

https://i.sstatic.net/8RxOB.png

https://i.sstatic.net/IQR5w.png

Demo:

Answer №3

As a newcomer, I recently discovered a way to completely eliminate the "Row Action" Line options in my application. I achieved this by navigating to Page Designer -> Content Body-> APEX$Row_Action-> and then going to the right side where I found the security options. By adjusting the Authorization Scheme to exclude rights from the 'role that has access to the page', I was able to remove the unwanted line options.

To customize the toolbar, I utilized a hack that I had previously come across. In the Java initialization code section under Attributes, I entered the following:

function(config) {
  var $ = apex.jQuery;
  var toolbarData = $.apex.interactiveGrid.copyDefaultToolbar(); 
  toolbarData.splice(5,3);
  //remove actions button
  config.autoAddRow = false;
  config.toolbarData = toolbarData;
  return config
}

Answer №4

Combining the insights of alli pierre yotti and AWildmann, I was able to customize my code to remove the "Fill" and "Clear" menu options, along with any others desired.

In the "Execute when Page Loads" attribute at the page level, I implemented the following code which allows for easy future modifications by using a variable for the region static id:

$(function() {

  regionStaticId = "emp"

  apex.region(regionStaticId).widget().interactiveGrid("getActions").remove("selection-duplicate");

  apex.region(regionStaticId).widget().interactiveGrid("getActions").remove("selection-copy");

  apex.region(regionStaticId).widget().interactiveGrid("getActions").remove("selection-fill");

  apex.region(regionStaticId).widget().interactiveGrid("getActions").remove("selection-copy-down");

   apex.region(regionStaticId).widget().interactiveGrid("getActions").remove("selection-clear");

});

Credit goes to the original contributors for providing the solution, while my input has been more on a surface level.

As this is my first post on stackoverflow, please forgive me if there are specific guidelines for referencing other contributors that I may have missed.

Answer №5

In order to conceal row-specific choices (specifically, the option to "Delete record"), I implement this CSS code:

[id$='ig_row_actions_menu_5'].a-Menu-item,li[id$='ig_row_actions_menu_5'] + .a-Menu-itemSep{ display:none }

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

When trying to serialize elements from a form loaded by Firefox using AJAX, encountering difficulties due to

Visit the live version of this at . When prompted for a formId, input BroadRunTrack2013. Follow by adding an item to cart and entering player name information (you can use random data for now). Select the Runner's Hat, choose color/size, specify quant ...

Getting information from PHP through AJAX for transmission to a separate PHP script

Hi everyone, I'm facing a bit of a challenge with my project. Here's the situation: I've got a PHP file that interacts with a database and displays the query results. Then, there's an HTML file that uses AJAX to show these results dyna ...

Can you help me figure out what is causing an issue in my code? Any tips on removing a collection from MongoDB

I'm currently facing an issue with deleting a collection from MongoDB using the Postman API. The update function in my code is working perfectly fine, but for some reason, the delete function is not working as expected. It keeps displaying an internal ...

Visualizing dynamic data with Ajax in a column bar chart

Trying to implement highcharts column bar charts, but facing issues with refreshing the data without reloading it. Unfortunately, I don't have access to the code I used at work to resolve this. Considering setting up a loop to run multiple times with ...

The internal style and script specified within the <head> section are not being rendered

Within my Joomla website using the T3 template, I inserted the following "Custom Code" just before the closing </head> tag: <style type="text/stylesheet"> div.t3-sidebar.t3-sidebar-right{ background: #F8F8F8 none repeat scroll 0% 0%; ...

The content has been successfully loaded using ajax, but it is not displaying

I've been experimenting with djax and have noticed that when I click on an anchor tag, the URL changes as expected. However, even though the page source reflects this change, the contents of the page itself remain unchanged. Any thoughts on why this m ...

eBay API request error: "You do not have the necessary permissions to complete the request."

While working on integrating the eBay API, I encountered an issue with creating a payment policy. Following the instructions provided in this guide , I generated a token and sent it using Postman. However, I received an error: { "errors": [ ...

Tips for finding the position of a specific object within an array of objects using JavaScript when it is an exact match

I am working with an array of objects and need to find the index of a specific object within the array when there is a match. Here is an example of my current array: let x = [ {name: "emily", info: { id: 123, gender: "female", age: 25}}, {name: "maggie", ...

Changing the color variable of an object using an onClick function in JavaScript

I'm currently working on a simple game where users can draw using the keys W, A, S, and D. If you want to take a look at the progress I've made so far, here is a JSFiddle link. There's a collision function in the code that I no longer need, ...

Guide on automatically opening downloaded files in a new tab in IE 11 or Edge similar to the way file downloads function in Chrome

I am currently using Windows 10 and implementing msSaveOrOpenBlob in JavaScript to download the AJAX call blob on IE11. I want the PDF file to be opened in a new tab without any prompts, similar to how it works in Chrome. However, even when trying with th ...

Is there a Node.js method that is similar to jQuery AJAX's .complete() function

In the process of creating a Node.js API to enroll a user in a different web application, I encountered an issue. As part of the registration flow, the API called by the Node app using request is being redirected with a status code of 301 to another API to ...

Decrease the space between slide items by reducing margins or increasing their width

I'm having trouble achieving the desired spacing between items, I would like more space between each item but they are currently too close together. I am looking for a margin of 10px or a width of 32% for each item. I have already looked into some re ...

Organizing requirejs and angularjs code structure into separate files

Looking to organize my Angular application with requirejs by separating controllers, services, and directives into different files. Hoping to achieve this structure: src/ components/ Navigation/ index.js module.js NavigationCon ...

Utilize the power of jQuery to easily toggle visibility of an overlay

I have successfully implemented JQuery to show and hide my overlay with great success. Now, I am interested in adding animations to enhance the user experience. After reviewing the jq documentation, I found some cool animations that can be easily integrate ...

Looking for a way to extract Regular Expressions from an IgGrid cell in Infragistics?

Is it possible to apply a regular expression to a igTextEditor within an igGrid Updating? I attempted to utilize the validate option, but it was unsuccessful. $("#schedulerTable").igGrid({ columns: $scope.schedulerColumns, widt ...

When attempting to retrieve the value of my select element, I encounter difficulty due to a hidden field that only becomes visible when a certain option is selected

I have a dropdown menu with different options, including one labeled "other". When the user selects "other", a hidden text field appears for them to enter a custom value. This functionality works correctly. However, if the user selects any other option and ...

How can I set a header to be automatically included in every "render" response in Node.js/Express?

One of the challenges I face involves implementing "controllers" in my code: app.get('/',function(req,res){ var stuff = { 'title': 'blah' }; res.render('mytemplate',stuff); }); In particular, I'm worki ...

Modifying canvas border colors using AngularJS

Currently, I am in the process of learning AngularJS and have developed a website that includes a canvas element. My main objective is to change the border color after clicking on a checkbox. Here is the code snippet for canvas.html : <!DOCTYPE html&g ...

Inject a heavy dose of Vue into your project

**I'm trying to implement the provide/inject logic in Vue. In my 'App.vue' component, I have defined the 'firstName' input as a string "John", and I want to display this value when the child component 'Step1' is created. ...

Using the typeof operator to test a Typescript array being passed as an object

I have a puzzling query about this particular code snippet. It goes like this: export function parseSomething(someList: string[]): string[] { someList.forEach((someField: string) => { console.log(typeof someField) }) Despite passing a s ...