You need to sign in to do that
Don't have an account?
sanjeev342
How do I display an empty records text for dataTable?
I would like my dataTable to display: No Records Found whenever there are no records to be retrieved.
Currently, I am doing this by putting an <apex:outputText/> field right outside of the dataTable. However, I would like the text to display inside of the dataTable, i.e. within any border it has.
How is this achievable? When moving the outputText within the dataTable tags, it became invisible.
Code:
<apex:dataTable value="{!ExamHistoryRecords}" var="ExamHistoryRecord" styleClass="myCFRETable" > <apex:column headerValue="Test Window"> <apex:outputText value="{!ExamHistoryRecord.Exam_Window_Start_Date}"/> </apex:column> <apex:column headerValue="Result"> <apex:outputText value="{!ExamHistoryRecord.Exam_Result}"/> </apex:column> <apex:column headerValue="Application Type"> <apex:outputText value="{!ExamHistoryRecord.Application_Type}" style="white-space:nowrap;"/> </apex:column> </apex:dataTable> <apex:outputLabel value="{!ExamHistoryIsEmpty}" style="font-style:italic;"/>
Thanks,
Sanjeev