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
shrey.tyagi88@tcs.comshrey.tyagi88@tcs.com 

Display PageBlock Table columns as separate rows-Please help!!

Hi Evryone ,
   I have this pretty simple code given below. Now everything works well here. What i want to do is, rather than the record being displayed as a 1 row with 3 columns. I want it to be displayed as 1 column 3 rows. Can anyone please help me with this?

Current Display Format : Name, Narrative Technical, Narrative Staffing
Desired Display Format : Name 1
                                             Narrative Technical 1
                                             Narrative Staffing 1
                                         Name 2
                                             Narrative Technical 2
                                             Narrative Staffing 2

<apex:page standardController="Project_Form__c" recordSetVar="ProjectForms">
    <apex:sectionHeader title="Form History"/>
    <apex:form >
        <apex:pageBlock >
            <apex:pageMessages />

            <apex:pageBlockSection title="Selected Project Review Forms" columns="1">
                 <apex:pageBlockTable value="{!selected}" var="form" columns="3">
                    <apex:column value="{!form.name}"/>
                    <apex:column value="{!form.Narrative_Technical__c}"/><br></br>
                    <apex:column value="{!form.Narrative_Staffing__c}"/><br></br>
                  </apex:pageBlockTable>
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>
Rahul KumarRahul Kumar (Salesforce Developers) 
Hi shrey,

May I request you to Please refer the below link which is similar to the Above Requirement.
​I hope it will be helpful.

Best Regards
Rahul Kumar



 
Sarvesh_OjhaSarvesh_Ojha
Hi Shrey,

Try this.
 
<apex:page standardController="Project_Form__c" recordSetVar="ProjectForms">
    <apex:sectionHeader title="Form History"/>
    <apex:form >
        <apex:pageBlock >
            <apex:pageMessages />

            <apex:pageBlockSection title="Selected Project Review Forms" columns="1">
                 <apex:pageBlockTable value="{!selected}" var="form" columns="1">
                    <apex:column value="{!form.name}"/>
                    <apex:column value="{!form.Narrative_Technical__c}"/><br></br>
                    <apex:column value="{!form.Narrative_Staffing__c}"/><br></br>
                  </apex:pageBlockTable>
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>

Thanks,
Sarvesh