function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
NoodleNoodle 

Visualforce Email dataTable Header Issue

Hi there.

I have an issue with a Visualforce email template. Because I'm using Rendered as on column values, it's not showing the HEADER of the column.
 
<messaging:emailTemplate subject="Your late Tasks" recipientType="User" 

    relatedToType="User"
    replyTo="noreply@acme.com" >

 <messaging:htmlEmailBody >
 
    <style>
    .col1 {width:50%; text-align:center;}
    .col2 {width:20%; text-align:center;}
    .col3 {width:30%; text-align:center;}       
    </style>
  
 Hello
 
  
 <br></br>
 <br></br>
 <br></br>
     
   
    
   <html>  
          <apex:dataTable var="a" value="{!recipient.Actions_Tasks_Assigned__r}" columns="3" width="100%" columnClasses="col1, col2, col3" border="1" >
            
            <apex:column value="{!a.Task__c}" headerValue="Name" rendered="{!a.Status__c == 'Complete'}"/> 
            <apex:column value="{!a.Project__c}" headerValue="Name2" rendered="{!a.Status__c == 'Complete'}"/>
            <apex:column value="{!a.Status__c}" headerValue="Name3" rendered="{!a.Status__c == 'Complete'}"/>
            
          </apex:dataTable>  
    </html>


 
 
 </messaging:htmlEmailBody>

</messaging:emailTemplate>

Any ideas how I can get the Header of each Column to Show?

Thanks in advance
ShashankShashank (Salesforce Developers) 
This seems to be standard functionality. However, are you saying that the header is not showing even if there are records which satisfy the criteria?