Show the column header in 2 lines in <apex:column>

Prady picture Prady · Jun 12, 2012 · Viewed 7.1k times · Source

I want to display the apex:column header in 2 lines. I have column with the header as "Distributed Total" I want to show in 2 lines

<apex:column headerValue="Distributed Total$">
  <apex:outputText value="${0, number, ###,##0.00}">
  <apex:param value="{!item.Dtotal}"/>
</apex:outputText>
</apex:column> 

Any idea how we can achieve this

Thanks

Pradip

Answer

Daniel Blackhall picture Daniel Blackhall · Jun 13, 2012

If I understand the question, you want a column header than spans 2 lines?

<apex:column>
    <apex:facet name="header">
        Distributed<br/>Total$
    </apex:facet>
    <apex:outputText value="${0, number, ###,##0.00}">
        <apex:param value="{!item.Dtotal}"/>
    </apex:outputText>
</apex:column>