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
Kent ManningKent Manning 

How to style the related lists on a Visualforce page

Does anyone have the code or know how to style the related lists on a visual force page so that it looks like the standard related list on a standard page view? 

 

I have built a visualforce detail page for our asset object.  I've added a number of related lists using the <apex:relatedList  list="service_Parts__r"/> and <apex:relatedList list="NotesAndAttachments"/> components.  The problem is that each of these related lists only displays the key field from the related object - nothing else.  How do I get these related lists to show additional fields from the related objects and have it look like (row colors, header style and actions) a standard related list?

 

Any help you could offer would be greatly appreciated.

 

Kent

sfdcfoxsfdcfox
<apex:pageBlock tabStyle="tabname">
  <apex:pageBlockTable value="{!valuelist}" var="item">
    <apex:column headerValue="" value="" />
  </apex:pageBlockTable>
</apex:pageBlock>

That's the best approximation I can give you.