javascriptoracle-apexoracle-apex-18.2

Remove Freeze Button Oracle APEX


I'd like to remove the Freeze and Hide Buttons from my Interactive Grid, whenever I click on a column header.

enter image description here

Problem is, I already had a solution previously when using Apex 5.1, though now that it's been upgraded to the 18.2 version, it doesn't seem to work anymore. This was the code I used before:

$("#grid_id").on("gridactivatecolumnheader", function(e){
    setTimeout(function() {
        $("#grid_id").find("[data-option='freeze']").remove();
        $("#grid_id").find("[data-option='hide']").remove();
    },
               1);
}
            );

I've tried other versions that I found online that sadly did nothing, such as the following:

function(config) {
    config.features = config.features || {};
    config.features.freeze = false;
    config.features.hide= false;
    return config;
}

Have these functions become deprecated on the latest version? Is there another way to hide these features? The Oracle Developer only really allows for the disabling of the Sort/Control Break/Aggregate.


Solution

  • $("#id").on("gridactivatecolumnheader", function(e){
        setTimeout(function() {
            $("#id_ig_column_header_menu").find("[data-option='freeze']").remove();
            $("#id_ig_column_header_menu").find("[data-option='hide']").remove();
        },1);
    });
    

    They change how that options is rendered in your HTML, the code above works. You need to find that options inside the "#id_ig_column_header_menu" and not just "#id".

    This resolve your problem today, tomorrow they can change this again.