Editing "Row-Action" Menu in APEX Interactive Grid

AWildmann picture AWildmann · Oct 9, 2018 · Viewed 6.9k times · Source

How can I change the available options inside the Selection part of a Row Actions Menu in Apex?

I was able to change the options on the Line Menu, but I'm still struggling to change anything on the Selection Menu.

Selection Menu on the left & Line Menu on the right

enter image description here

Answer

alli pierre yotti picture alli pierre yotti · Oct 10, 2018

you can try something like this:

  • Add that Code on Execute When Page Load at Page Level property

   

 $(function() {
    // Add new Element in 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");
            }
        });
    
 // Disable Items in the Menu  
 apex.region("emp").widget().interactiveGrid("getActions").disable("selection-duplicate");
        
 apex.region("emp").widget().interactiveGrid("getActions").disable("selection-revert");
    });

To understand how the Menu Widget works, have a look here https://docs.oracle.com/database/apex-18.2/AEXJS/menu.html

enter image description here

enter image description here

Demo: https://apex.oracle.com/pls/apex/f?p=28835:2