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
V AnandV Anand 

How to display fields in row wise in visualforce?

Hi.............

In visual force we are displaying field names in column wise ... but I want to display in row wise ,how can I do that........  

 

Kapil GoutamKapil Goutam

You can create row wise structure by below two options-

 

<table cellspacing="0" cellpadding="0" border="0px">
    <apex:repeat value="{!listOfObject}" var="lst">
        <tr>
            <td>{!lst.FieldName}</td>
            <td>{!lst.FieldValue}</td>
        </tr>
    </apex:repeat>    
</table>   

 

or something like below

 

<apex:repeat value="{!listOfObject}" var="lst">
        <apex:pageBlockSection columns="1" >   
            <apex:pageBlockSectionItem >
                <apex:outputLabel value="{!lst.FieldName}" />
                <apex:outputLabel value="{!lst.FieldValue}" />
            </apex:pageBlockSectionItem>
        <apex:pageBlockSection>
 </apex:repeat>                        

V AnandV Anand
Thank you for your reply .........