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"> </apex:facet>
</apex:ListViews>
Try giving anything inside the facet, and that will appear in the buttons section.
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
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.
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
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">
</apex:facet>
</apex:ListViews>
Try giving anything inside the facet, and that will appear in the buttons section.
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!!!