+ Start a Discussion
SimrinSimrin 

align columns vertically for pageBlockTable

<apex:page standardController="Account">

    <apex:pageBlock title="My Content">

        <apex:pageBlockTable value="{!account.Contacts}" var="item">

            <apex:column value="{!item.name}"/> 

            <apex:column value="{!item.name1}"/>

        </apex:pageBlockTable> 

    </apex:pageBlockTable> 

</apex:page>
I have a PageBlockTable which is inside repeat, and eache pageBlockTable have only one row, so i want to display my table vertically.

Any ways to achieve it ?
Best Answer chosen by Simrin
Swayam  AroraSwayam Arora
Hi Simrin,

What about using apex:repeat and not apex:pageblocktable.
 
<apex:page standardController="Account">
    <apex:pageBlock title="My Content">        
        <apex:repeat value="{!account.Contacts}" var="item">			
			<table>
				<tr>{!item.name}</tr>
				<tr>{!item.name1}</tr>
			</table>
        </apex:repeat> 
    </apex:pageBlock> 
</apex:page>

Please close the thread marking this answer as Best Answer if it really helped. Closing the thread help others finding the correct answer.
 

All Answers

Swayam  AroraSwayam Arora
I am not able to visualise what you want to implement. Can you please clarify how are you vertivcally visualising your table?
SimrinSimrin
I want the later part using  pageBlockTable 
Swayam  AroraSwayam Arora
Hi Simrin,

What about using apex:repeat and not apex:pageblocktable.
 
<apex:page standardController="Account">
    <apex:pageBlock title="My Content">        
        <apex:repeat value="{!account.Contacts}" var="item">			
			<table>
				<tr>{!item.name}</tr>
				<tr>{!item.name1}</tr>
			</table>
        </apex:repeat> 
    </apex:pageBlock> 
</apex:page>

Please close the thread marking this answer as Best Answer if it really helped. Closing the thread help others finding the correct answer.
 
This was selected as the best answer