+ Start a Discussion
lapaullapaul 

Disable edit button in Enhanced list view

Hi,

Is there a way to disable the Edit buttoni n the Enhanced list view? Thank you much.

 

Paul

 

Shabs786521Shabs786521

Hi Paul,

 

Just a question if you can help me?

 

Is there a way to have an enhanced list view for a visualforce page. If yes, can you please provide me any literature or reference material ?

 

Thanks

Shabs

SuriSuri

No, I don't think there is a way to disable the "Edit" button in the Enhanced List View.

 

But you can hide the "New" / "Edit" buttons in the <apex: listViews> though.

 

 

(@ Shabs): Have a look at http://www.salesforce.com/us/developer/docs/pages/index.htm and search for "enhancedList". You'll find information there.

lapaullapaul

Thanks for you reply. could you elaborate more on the listViews. Please provide me sample code on

how to do hide the Edit button.

 

thanks

SuriSuri

Using the apex: ListViews, you can use the "apex: facet" inside the ListViews to hide the buttons section. The contents of the header facet override the header section of the ListViews.

 

For example, the code below will override the top section of the ListViews (i.e., the Buttons "New", "Edit" etc.) by what ever is specified inside the facet.

 

<apex:ListViews type="MyCustomObject__c" >


                            <apex:facet name="header">
                            &nbsp;
                            </apex:facet>


</apex:ListViews>

 

Try giving anything inside the facet, and that will appear in the buttons section.

DJ Rock your own styleDJ Rock your own style

Use this:

 

<style>
.actionColumn{ display: none; visibility:hidden;}
</style>

 

actionColumn is the name of the Edit/Delete column. You can see it from page source.

 

Hope it helps.

 

Regards,

Dave

 

If a reply solves your issue, please mark it as solved..

Cheers!!!