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 current 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 VF page:
<apex:page standardController="Campaign"
extensions="CampaignController"
renderAs="PDF"
showHeader="false"
applyHtmlTag="true"
applyBodyTag="true"
>
<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>
</apex:page>