+ Start a Discussion
sfdc18sfdc18 

Display data row wise in tables on vf page

Hi,

 

I want to display my data row wise in tables on visualforce page.

 

I have tried with following code but it is giving me output columnwise.

 

<apex:page standardController="Account">
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection columns="3">
<apex:pageBlockTable value="{!Account}" var="myUser" id="table1" width="200">
     <apex:column value="{!myUser.Name}" />
     <apex:column value="{!myUser.Phone}" />
     <apex:column value="{!myUser.Name}" />
</apex:pageBlockTable>

<apex:pageBlockTable value="{!Account}" var="myUser" id="table2" columnsWidth="20">
     <apex:column value="{!myUser.Name}" />
     <apex:column value="{!myUser.Phone}" />
     <apex:column value="{!myUser.Name}" />
</apex:pageBlockTable>

<apex:pageBlockTable value="{!Account}" var="myUser" id="table3" columnsWidth="20">
     <apex:column value="{!myUser.Name}" />
     <apex:column value="{!myUser.Phone}" />
     <apex:column value="{!myUser.Name}" />
      
</apex:pageBlockTable>

<apex:pageBlockTable value="{!Account}" var="myUser" id="table4" columnsWidth="20">
     <apex:column value="{!myUser.Name}" />
     <apex:column value="{!myUser.Phone}" />
     <apex:column value="{!myUser.Name}" />
</apex:pageBlockTable>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>

 

Kindly Help

 

Regards,

Mayur

 

Sridhar BonagiriSridhar Bonagiri

Hi,

 

Let me know how you want to display the data on VF page, Data in grid?

 

 

Regards,

Sridhar Bonagiri