javascriptoracle-databaseoracle-apexinteractive-grid

Remove actions from the Interactive Grid "Row Action" button - Oracle Apex v21.1


I would like to remove the Single Row View action on the "Row Actions" button on the Interactive Grid :

Single Row View

Also, I would like to remove these following actions on the row actions menu aswell, because these have no translations available based on the translation documentation for the 21.1 version of Oracle Apex :

row actions to remove

I came across some existing post about this subject, but I don't know why it's not working for me, I tried to add a static ID to the IG and put this JavaScript function on Page Load (credit to this post) :

$(window).on("load", function() {
    var actions = apex.region("archiveList").widget().interactiveGrid("getActions");
    actions.remove("selection-add-row");
    actions.remove("selection-duplicate");
    actions.remove("selection-fill"); 
    actions.remove("selection-clear"); 
    actions.remove("selection-delete");
    actions.remove("selection-copy-down");
    actions.remove("selection-copy");
    actions.remove("selection-refresh"); 
    actions.remove("selection-revert"); 
    actions.remove("single-row-view");
    actions.remove("row-add-row");
    actions.remove("row-duplicate");
    actions.remove("row-delete"); 
    actions.remove("row-refresh"); 
    actions.remove("row-revert"); 
});

To summarize everything, I want to remove these following actions :

Thank you in advance,


Solution

  • This works for me (on 21.2). I created a dynamic action on page load with a true action of type "execute javascript". My region static id is "emp-ig".

    let actions = apex.region("emp-ig").call("getActions");
    actions.hide("selection-duplicate");
    actions.hide("selection-delete");
    actions.hide("selection-copy-down");
    actions.hide("selection-copy");
    actions.hide("selection-refresh"); 
    actions.hide("selection-revert"); 
    actions.hide("selection-add-row");
    actions.hide("selection-fill"); 
    actions.hide("selection-clear"); 
    actions.hide("single-row-view");
    actions.hide("row-add-row");
    actions.hide("row-duplicate");
    actions.hide("row-delete"); 
    actions.hide("row-refresh");  
    actions.hide("row-revert");  
    

    The actions.remove doesn't work for all actions, and it also throws warnings in the console. Since you're removing all actions from the row actions menu I'd hide that column from the report.