You need to sign in to do that
Don't have an account?
Will Edwards
How does one transpose rows in a pageblocktable into columns?
I have several values for a child campaign that I'd like to display as columns rather than rows.
I would like the first row to be Hidden_Speaker_Name__c and the second row to be Average_Speaker_Value__c, rather than columbs as they are now. Thanks.
My controller:
I would like the first row to be Hidden_Speaker_Name__c and the second row to be Average_Speaker_Value__c, rather than columbs as they are now. Thanks.
My controller:
public class CampaignController { public Campaign camp {get; set;} public CampaignController(ApexPages.StandardController controller) { camp = (Campaign) controller.getRecord(); if(camp != null && camp.Id != null) { camp = [Select Id, Name, (Select Id, Average_Speaker_Value__c, Hidden_Speaker_Name__c, Type FROM ChildCampaigns WHERE Type = 'Speakers') FROM Campaign WHERE Id =: camp.Id]; } } }My current code:
<apex:pageBlockTable value="{!camp.ChildCampaigns}" var="cc" > <apex:column headerValue="Speaker" headerClass="headerStyle" value="!cc.Hidden_Speaker_Name__c}"/> <apex:column headerValue="Score" headerClass="headerStyle" value="!cc.Average_Speaker_Value__c}"/> </apex:pageBlockTable>
Here is the code.
VF page,
Controller,
Let me know if u face any issues.