function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Boman@imtBoman@imt 

Cannot hide ACTION_COLOMN in EnhancedList

I've overridden the tab for a custom object and am trying to use jquery to hide() the ACTION_COLUMN since I do not want those operations available to CP users, but it's not working! Easily done when I use the traditional apex:listViews.

 

<script>
  var j$ = jQuery.noConflict();
  j$(document).ready(function() { 
    console.log("Trying to hide!!!")
    j$(".x-grid3-hd-btn").hide();
    j$(".x-grid3-hd-inner").hide();
    j$(".x-grid3-hd-ACTION_COLUMN").hide();    
  });  
</script>

 

Any suggestions?

bob_buzzardbob_buzzard

Is it a timing issue?  The jquery will fire as soon as the document is ready, so if the enhanced list is also using javascript to set itself up the elements might not be there when you execute.

 

I'd add some debug to output the results of the selectors.

Boman@imtBoman@imt
Could not figure out what was causing it.

Eventually went with:

<br>.x-grid3-hd-ACTION_COLUMN {display:none; visibility:hidden}<br>.x-grid3-td-ACTION_COLUMN {display:none; visibility:hidden}<br>

and it works.

Thanks!