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
madhumadhu 

increase width of a pageblock table in vfpage

i have created a vfpage and placed in the account related list pagelayout. The Vfpage having 7 field to display but it is showing only 3 fields.
Please let me know how th increase the width of the page block table in vfpage
Shashikant SharmaShashikant Sharma
You could increase the width by using style attribute
<apex:pageBlockTable value="{!listRows}" var="row" style="width:900px">

Thanks
Shashikant
William TranWilliam Tran
If you still have issue, please post your code.

​Thx
madhumadhu
hi,

Still i can't change the width of the pageblock table. It is displaying only 3 field out of 7 fields in the account related list.



<apex:page standardController="account" extensions="account class">
           <apex:pageblock >
                  <apex:pageBlockTable value="{!acclist}" var="v" style="width:2000px;"> 
                          <apex:column headervalue=" name" value="{!v.name}">
                           </apex:column>
                   </apex:pageBlockTable>
            </apex:pageblock>
 </apex:page>
William TranWilliam Tran
It likely has nothing to do with field width.

Can you send the full VF page and extensions classes.

Your current page only has one column Name, where are the rest of the 7 columns?

Try this and you should see all 7 of them.
<apex:page standardController="account" extensions="account class">
           <apex:pageblock >
                  <apex:pageBlockTable value="{!acclist}" var="v"> 
                <apex:column headervalue=" name" value="{!v.name}"/>
                <apex:column headervalue=" name" value="{!v.name}"/>
                <apex:column headervalue=" name" value="{!v.name}"/>
                <apex:column headervalue=" name" value="{!v.name}"/>
                <apex:column headervalue=" name" value="{!v.name}"/>
                <apex:column headervalue=" name" value="{!v.name}"/>
                <apex:column headervalue=" name" value="{!v.name}"/>
                   </apex:pageBlockTable>
            </apex:pageblock>
 </apex:page>

Thx
William TranWilliam Tran
Madhu,

Also, as a common practice, if your question is answered, please choose 1 best answer.
But you can give every answer a thumb up if that answer is helpful to you.

This will help keep the forum clean and help future users determine what answers are useful
and what answer was the best in resolving the user's issue.

Thanks