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:

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