+ Start a Discussion
suresh.csksuresh.csk 

pageBlockTable width/column width not expanding

Hi.

 

VF code:

 

<apex:pageBlockSection >


<apex:pageBlockTable value="{!accounts}" var="a" columns="3"  style="font-size:25px"  >

<apex:column headervalue="Customer Name" value="{!a.acc.Field3__c}"  />
<apex:column headervalue="Account Name" value="{!a.acc.Name}" />
<apex:column headervalue="Comments" value="{!a.acc.NlTokki__c}" />
</apex:pageBlockTable>


</apex:pageBlockSection>

 

In the above there are 3 columns in the pageblockTable.

Unable to stretch or expand the above 3 columns to a full page.

I also tired with width=" " columnsWidth="" but nothing worked.

The columns are not expanding after certain size.

I need these 3 columns to displayed equally in a full page mode.

 

 

Ideas are greatly appreciated.

 

 

Best Answer chosen by Admin (Salesforce Developers) 
suresh.csksuresh.csk

Hi.

 

Got the solution.

The problem was the <pageBlockTable> was coded inside the <apex:pageBlockSection >,so there

was a problem that columns cant be expaned.

 

I removed the <apex:pageBlockSection > and worked fine.

 

cheers

suresh

 

 

 

All Answers

suresh.csksuresh.csk

Hi.

 

Got the solution.

The problem was the <pageBlockTable> was coded inside the <apex:pageBlockSection >,so there

was a problem that columns cant be expaned.

 

I removed the <apex:pageBlockSection > and worked fine.

 

cheers

suresh

 

 

 

This was selected as the best answer
Reid J MaulsbyReid J Maulsby

For those searching for this solution depending on what you're wanting to do, try using the columns="1" attribute.

 

<apex:pageBlockSection title="Title Text" columns="1">

 

 

This allows the table to expand the width of the screen while keeping the pageBlockSection intact.

Martha_SenetaMartha_Seneta

Thanks!  Including columns="1" worked great for me.

hsupriyahsupriya

Spot on! I tried everything possible thing to make it work. 

Nagesh Rajmane 9Nagesh Rajmane 9
Thanks  Reid J Maulsby it worked for me!!