• Clint_Lee
  • NEWBIE
  • 0 Points
  • Member since 2009
  • The Flywheel Group


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
I created a VF page for a custom object and would like to have the column header "Certification Year" sorted by default in decending order.

Is there an easy way to do this without a controller? I'm new to coding and am not familiar with this. Or can someone help me with getting it done?

This is the code I have for the visualforce page:


<apex:page standardController="Account">
   
      You are viewing the {!account.name} account.

      <apex:pageBlock title="ONS's">

      <apex:pageBlockTable value="{!account.ONC_s__r}" var="onc">

         <apex:column value="{!onc.Name}"/>
         <apex:column value="{!onc.Owner.name}"/>
         <apex:column value="{!onc.Certification_Year__c}"  />
         <apex:column value="{!onc.Practice_Setting__c}"/>
         

      </apex:pageBlockTable>

   </apex:pageBlock>

</apex:page>