+ Start a Discussion
RDeepaRDeepa 

How to wrap the outputfield value given inside the pageblocktable?

Hi,

 

I have a requirement to display the fields in the table format rendered as PDF (detail mode).  Based on the length of the values in the cell, table is getting extended. I want to wrap the field's value. 

 

Please find the below code:

 

 

<apex:pageBlockTable value="{!relationshipproduct}" var="r" columns="10" rows="4" border="1px" style="font-size:8pt;"> <apex:column headerValue="Cap Mkts" style="width:30%;word-wrap:break-word;"> <apex:outputField value="{!r.AUM_Cap_Mkts__c}"/> </apex:column> </apex:pageBlockTable>

 I tried with word-wrap for column component. But the value is not getting wrapped. How can i wrap the outputfield value in visualforce?

 

Can anyone suggest me the way to achieve this?

 

Regards,

Deepa


 

MATTYBMEMATTYBME

Have you tried Style tags? Without an actual example for me to play with I am not sure whether you would need to place the style tags inside head tags at the top of the VF page and referencing the apex : column by a < p > and including something like:

 

 

<TEXTAREA NAME="SOFT" COLS=25 ROWS=5 WRAP=SOFT> or <TEXTAREA NAME="HARD" COLS=25 ROWS=5 WRAP=HARD> or <TEXTAREA NAME="NONE" COLS=25 ROWS=5>

 

 The other thought would be to create a CSS file and place it in Static Resources and then reference that CSS in your VF page. With this you could then have a div tag:

 

 

<div id="main-wrap">