You need to sign in to do that
Don't have an account?
Headings in Parent-Child Table
I am showing a table that includes records from parent and child objects. I have something working OK, except that it repeats headings for the child records in each parent row.
Here is query:
CompChanges = [Select Name,(Select Maturity__r.Name,Total__c,ScheduleTracking__c,ExpenseTracking__c,
CapitalTracking__c,LateStart__c,Late__c
From dbPracticeChanges__r) From Competency__c];
Using the VF below the picture, I get child table headers in each parent row. I really want to have the child headers appear in the top of the table one time. How can I change the VF below the table to do that? Any help much appreciated.
<apex:page controller="dbPracticeChangesController">
<apex:form >
<apex:pageblock >
<apex:pageblocktable value="{!ChangeList}" var="cs">
<apex:column headervalue="Competency">
<apex:outputtext value="{!cs.Name}"/>
</apex:column>
<apex:column >
<apex:facet name="header">
Practice Status
</apex:facet>
<apex:pageblocktable value="{!cs.dbPracticeChanges__r}" var="db">
<apex:column headervalue="Maturity">
<apex:outputtext value="{!db.Maturity__r.Name}"/>
</apex:column>
<apex:column headervalue="Total">
<apex:outputtext value="{!db.Total__c}"/>
</apex:column>
<apex:column headervalue="Schedule">
<apex:outputtext value="{!db.ScheduleTracking__c}"/>
</apex:column>
<apex:column headervalue="Expense">
<apex:outputtext value="{!db.ExpenseTracking__c}"/>
</apex:column>
<apex:column headervalue="Capital">
<apex:outputtext value="{!db.CapitalTracking__c}"/>
</apex:column>
<apex:column headervalue="Late Start">
<apex:outputtext value="{!db.LateStart__c}"/>
</apex:column>
<apex:column headervalue="Late">
<apex:outputtext value="{!db.Late__c}"/>
</apex:column>
</apex:pageblocktable>
</apex:column>
</apex:pageblocktable>
</apex:pageblock>
</apex:form>
</apex:page>