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
Adriana VoyceAdriana Voyce 

Customize columns on Visualforce Page or related list

I created a VF page to show a related list. For example if I was using this code, how can I customize what columns to display on the VF pg. The code below is showing the related list of my related record in a VFpage. So whatever fields I have selected in my related list are displayed in the VF page. The problem I am running across is that when I remove the related from the page layout my VF Pg display changes to just show the default which is the record name and no the columns. I do not want the related list on the layout only the VF page.
<apex:page standardController="MyMasterObject__c">
<apex:relatedList list="MyChildObjects__r" />
</apex:page>