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
Srivat 11Srivat 11 

Extend Column width of a visualforce page in lightning

Hello All,

I am trying to extend the width of a visualforce page related list in the lightning interface, but I am unable to figure out how.
The visualforce page related list looks like this in the lightnin interface-

User-added image

The related list does not extend completely in the lightning interface but it works correctly in the classic interface.

Here is my visualforce code-
<apex:page standardController="Account" extensions="AccountRelatedListController" sidebar="true" showHeader="false"   lightningstylesheets="true">    
    <apex:form >                
        <apex:pageblock id="AccountList" tabStyle="account">  
            <div style="margin-left: 30%;"><apex:commandLink value="New Account" action="{!newAccount}" target="_parent" styleClass="btn" style="text-decoration:none;padding:4px;"/></div>
            <br/>
            <apex:pageBlockTable value="{!accounts}" var="acct" columns="4"  rendered="{!NOT(ISNULL(accounts))}">                
                <apex:column HeaderValue="Action" >
                    <apex:commandLink value="Edit" style="color:#015ba7;" action="{!editAccount}" target="_parent" ><apex:param value="{!acct.id}" name="AccountId"/>
                    </apex:commandLink>
                    &nbsp;|&nbsp;
                    <apex:commandLink value="Del" onclick="return confirm('Are you sure?')" style="color:#015ba7;" action="{!deleteAccount}" target="_parent"><apex:param value="{!acct.id}" name="AccountId"/>
                    </apex:commandLink>
                </apex:column>
                <apex:column headerValue="Account Name"><apex:outputLink value="/{!acct.id}" target="_blank">{!acct.Name}</apex:outputLink> </apex:column>              
                <apex:column value="{!acct.Industry}"/>
                <apex:column value="{!acct.Phone}"/>
                <apex:outputLabel value="No records to display" rendered="{!(ISNULL(accounts))}" styleClass="noRowsHeader"></apex:outputLabel>
            </apex:pageBlockTable>            
        </apex:pageblock>
    </apex:form>  
</apex:page>


 
Khan AnasKhan Anas (Salesforce Developers) 
Hi Srivat,

Greetings to you!

Please refer to the below link which might help you further with the above requirement.

https://salesforce.stackexchange.com/questions/146588/embedded-visualforce-page-on-page-layout-height-is-restricted-in-lightning-exp?rq=1

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas