Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Removing items from row action menu in Interactive grid in Apex 20.1

Jake4321Sep 23 2020 — edited Sep 24 2020

Hi all,

just referring back to this previous post Removing items from row action menu in Interactive grid in Apex 5.1

I am trying to remove the add button from my interactive grid and I beleive I am getting in the snag on the last paragraph where John Snyder mentions this :

"it doesn't work because the hidden state comes from the action if there is one. So what you can do to keep the actions but hide the menu items is this:"

$(function() {

// listen for view change events to find out when grid views are created

$("#equipetravail").on("interactivegridviewchange", function(event, data) {

    if ( data.view === "grid" && data.created ) {

        var view = apex.region("equipetravail").widget().interactiveGrid("getViews", "grid"),

            menu$ = view.selActionMenu$;

var item;

menu$ = view.rowActionMenu$;

item = menu$.menu("find", "ins");

item.action = function() {};

item.hide = true;

    }

});

});

Now I am trying to figure out exactly what this means and where exactly I should put this code.

Currently I have allmost everything working except I have this in my grid:

pastedImage_3.png

So I suspect I have to either hide and remove or remove and hide. This is my code to remove.

function(config) {

config.reportSettingsArea = false;

config.defaultGridViewOptions = {footer: false};

config.initActions = function( actions ) {

actions.remove("selection-add-row");

actions.remove("row-add-row");  

}

return config;

Question is where and when do I hide the button?

Any comments, tips suggestions are greatly appreciated as usual.

Thanks,

Jake

Modified by : Jake4321

This post has been answered by Jake4321 on Sep 24 2020
Jump to Answer
Comments
Post Details
Added on Sep 23 2020
2 comments
1,837 views