<apex:dataTable value="{!Contacts}">
<apex:column >
<apex:outputText>{!c.number.name}</apex:outputText>
</apex:column>
</apex:dataTable>
For example, hide the number column if all contacts has no number.
6 Antworten

Hi Jeffrey,
You can use the rendered property.Something like below:
<apex:dataTable value="{!Contact}" var="con">
<apex:column rendered="{!con.firstname<>""}">
<apex:outputText>{!con.name}</apex:outputText>
</apex:column>
</apex:dataTable>
It would only render the column if contact has a first name.
Please mark it the best answer if it solves the issue.
Best,
Savina