+ Start a Discussion
EguiEgui 

New lign in apex:dataTable

Hi,

 

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>
            <apex:column headerValue="col2">
               <apex:outputText value="data"/>
            </apex:column>
        </apex:dataTable>

 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.

Starz26Starz26

In your controller add a method:

 

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



Then use:

 

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

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