Activity Forums Salesforce® Discussions How to show four columns for output field in one page section in the Salesforce vf page?

  • Piyush

    Member
    December 12, 2019 at 7:13 am

    Hi Deepak,

    check the code and take help from this code:-

    https://salesforce.stackexchange.com/questions/34385/pageblocksection-with-4-columns

    <apex:page standardController="Account">
       <apex:form >
            <table width="100%">
                   <tr>
                    <td>
                    <apex:outputLabel value="Field1" style="font-weight:bold"/>
                    &nbsp;&nbsp;
                    <apex:outputField value="{!Account.Field1__c}"/>
                    </td>
                    <td>
                    <apex:outputLabel value="Field2" style="font-weight:bold"/>
                    &nbsp;&nbsp;
                     <apex:outputField value="{!Account.Field2__c}"/>
                    </td>
                    <td>
                    <apex:outputLabel value="Field3" style="font-weight:bold"/>
                    &nbsp;&nbsp;
                    <apex:outputField value="{!Account.Field3__c}"/>
                    </td>
                    <td>
                    <apex:outputLabel value="Field4" style="font-weight:bold"/>
                    &nbsp;&nbsp;
                    <apex:outputField value="{!Account.Field4__c}"/>
                    </td>
                   </tr>
                   <tr>
                   <td>
                   <apex:outputLabel value="Field5" style="font-weight:bold"/>
                    &nbsp;&nbsp;
                    <apex:outputField value="{!Account.Field5__c}"/>
                    </td>
                    <td>
                    <apex:outputLabel value="Field6" style="font-weight:bold"/>
                    &nbsp;&nbsp;
                     <apex:outputField value="{!Account.Field6__c}"/>
                    </td>
                    <td>
                    <apex:outputLabel value="Field7" style="font-weight:bold"/>
                    &nbsp;&nbsp;
                    <apex:outputField value="{!Account.Field7__c}"/>
                    </td>
                    <td>
                    <apex:outputLabel value="Field8" style="font-weight:bold"/>
                    &nbsp;&nbsp;
                    <apex:outputField value="{!Account.Field8__c}"/>
                    </td>
                   </tr>
                  </table> 
              </apex:form> 
     </apex:page>

     

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos