Search code examples
javascriptoracle-apexoracle-apex-5

Editing "Row-Action" Menu in APEX Interactive Grid


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


Solution

  • I found a solution for the editing I wanted. Sharing it here for someone that might want to use it too.

    function(config) {
        config.initActions = function( actions ) {
            // löscht die Option "Single Row-Ansicht"
            actions.remove("single-row-view");
            actions.remove("selection-duplicate");
            actions.remove("selection-refresh");
        };
        return config;
    }
    

    By using the remove action, rather than the widget.disable I was able to remove the fields from the Selection Menu that I meant to change.

    enter image description here

    Edit: There's a few new options that APEX 18.2 seems to have added. Here are the codes I found so far that disables them. The ones I still haven't figured out how to remove are the "Fill" and "Clear" options. Hope it's useful to anyone trying to get rid of these options.

    The code that targets the first two options shown here are:

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

    I've attempted using the "selection" prefix for the fill and clear options, yet to no avail. If anyone knows their codes, please let me know.

    enter image description here