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
aaaaaaaaaaaaaaaaaaaaaa 

how to wrap text in a column of page block table??

hii,

 

i have a pageblock table  which has columns

 

one of the column has data coming from field whose data type is text(256)

 

i have fixed the width of the column as

<apex:column width="30%" >

 

but when i write a long text value in the field.........the column width goes beyond 30%

 

so i want to wrap the text to second line when the width is 30% so that it cannot go beyond 30%

 

please provide me way of doing it !!!!!!

prakash_sfdcprakash_sfdc
To Wrap TD text

First set table style

table-layout: fixed;

then set TD Style

word-wrap:break-word;

here TD is column

sfdcFanBoysfdcFanBoy
Using white-space attribute worked for me easily.  The whole table must be fixed width also to be able to wrap the text.

https://sfdcfanboy.com/2018/03/27/a-tip-a-day-38-pageblocktable-wrap-text/