Discussions
- General Development
- Schema Development
- Apex Code Development
- Visualforce Development
- Formulas & Validation Rules
- Security
- Mobile
- Force.com Sites & Site.com
- Chatter Development
- Java Development
- .NET Development
- Perl, PHP, Python & Ruby
- Desktop Integration
- APIs and Integrations
- Visual Workflow
- Apple, Mac and OS X
- VB and Office Development
- AppExchange Directory & Packaging
- Salesforce Labs & Open Source Projects
- Other Salesforce Applications
- Jobs Board
- Force.com Discussion Boards
- :
- Developer Boards for Force.com and Database.com
- :
- Visualforce Development
- :
- how to hide/remove related list icons while render...
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
how to hide/remov e related list icons while rendering in a VF page?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
12-30-2011 01:19 AM
Hi,
I have a requirement where i have to hide or remove the icons of related list like Contract/Account,Contacts etc.
I have to use <apex:relatedlist> because of some restrictions. But the icons are also appearing which is not required.
I tried below code by reading the html source and tried to hide the relatedListIcon class but it is not working.
Can you please suggest.
<apex:page standardController="Account" standardStylesheets="
<style>
body
{
font-size:13px;
}
</style>
<style>
.relatedListIcon{display:none;}
</style>
<apex:relatedList list="Contacts"></apex:relatedList>
</apex:page>
Thanks and regards
Srinivasu
Solved! Go to Solution.
Re: how to hide/remov e related list icons while rendering in a VF page?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
12-30-2011 03:26 AM
You could use facets to replace the header of the relatedList to something other than the default icon and buttons.
E.g. something like:
<apex:page standardController="Account" standardStylesheets="true" sidebar="false" showheader="false">
<style>
body
{
font-size:13px;
}
</style>
<apex:relatedList list="Contacts" >
<apex:facet name="header">My New Header</apex:facet>
</apex:relatedList>
</apex:page>
Re: how to hide/remov e related list icons while rendering in a VF page?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
01-01-2012 11:38 PM
Hi John,
Thank u for the simple solution.
But is it possible to increase the font size of only the header part using this piece of code.
Thanks and regards
Srinivasu
Re: how to hide/remov e related list icons while rendering in a VF page?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-03-2012 10:59 AM
Hello.
I ran into a similar problem, and was able to style the title of the related list by extracting the <table> code from an existing related list, and wrapping that in my "header" facet. See below:
<apex:relatedList list="Contact_Call_Report_Links__r" pageSize="10"> <apex:facet name="header"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td class="pbTitle"><img src="/s.gif" alt="" width="1" height="1" class="minWidth" title=""/><img src="/s.gif" alt="" class="relatedListIcon" title=""/><h3>PUT YOUR RELATED LIST TITLE HERE</h3></td><td class="pbButton"> </td></tr></tbody></table></apex:facet> </apex:relatedList>
I'm not sure if that's the best way, and it might break with future saleforce updates, but it's working for me right now. Let me know if there is a better way.
-Greg

