+ Start a Discussion

New lign in apex:dataTable



I'm using a dataTable to display data :


<apex:dataTable value="{!relatedTo.OpportunityLineItems}" var="line" width="100%">
            <apex:column headerValue="col1">
                <apex:outputText value="data"/>
            <apex:column headerValue="col2">
               <apex:outputText value="data"/>

 and i would like to have a new line after each line of the table


I tried to put some <br/> but this is not working, I also tried with CSS lign-heigt but this is not recognized in mail web clients.


Thanks for help.


In your controller add a method:


public String NewLine { 
    get { return '\r\n'; }

Then use:


<apex:outputtext value="{!NewLine}"/>

in you VF Page. You may also have to wrap the page in the <pre> tag