IG Hack - #3, Different ways to Hide Save Button Using JavaScript/CSS in Oracle APEX Interactive Grid

In this post we will see, Different ways to hide save button using JavaScript/CSS in Oracle APEX Interactive Grid.

Method 1: 

Using any one of the below JavaScript code in the Execute When Page Loads section of the page.

apex.region("YOUR_IG_STATIC_ID").call("getActions").hide("save");

(OR)

$("#YOUR_IG_STATIC_ID .a-Button.a-Toolbar-item.js-actionButton.a-Button--hot[data-action='save']").hide();

Method 2: 

Using the below JavaScript code in the JavaScript Initialization Code section in the Interactive Grid.

function (config)
{
    var $ = apex.jQuery,
        toolbarData = $.apex.interactiveGrid.copyDefaultToolbar(),
        toolbarGroup = toolbarData.toolbarFind( "actions2" );

    //Hide save button
    toolbarGroup.controls.splice(toolbarGroup.controls.indexOf("save"),1);
    config.toolbarData = toolbarData;

  return config;
}

Method 3: 

Using the below CSS in the CSS > Inline  section of the page.

#YOUR_IG_STATIC_ID .a-Button.a-Toolbar-item.js-actionButton.a-Button--hot[data-action="save"] { display: none !important; }

Note: In all the above codes Replace YOUR_IG_STATIC_ID with the Static ID of your Interactive Grid.


Happy CODING!!!

Thank You :)

Comments

Popular posts from this blog

Display and Edit CLOB Content in Oracle APEX

Allow Only Number/Decimal values In a Number/Text Field Using JavaScript in Oracle APEX

Copy the value of an Item to Clipboard in Oracle APEX