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
Lakshmi SLakshmi S 

pageblock section item reRender alignment issue ?

Hi Team,

Visualforce page inputfield reRender based on condition, i am getting alignment issue. Please check and let me know how can we resolve this issue .
<apex:pageBlockSectionItem >
                    <Label>Account currently use or Not </Label>
                    <apex:actionRegion >
                        <apex:inputField value="{!Account.Account_currently_use__c}">
                            <apex:actionSupport event="onchange" reRender="desc" />
                        </apex:inputField>
                    </apex:actionRegion>
                    
 </apex:pageBlockSectionItem>
  <apex:outputPanel id="desc" layout="None" >
                <apex:pageBlockSectionItem rendered="{!if(Account.Account_currently_use__c == 'Yes',true,false)}" >
                    Acct currently use(Des)  
                    <apex:inputTextarea cols="50" rows="3" value="{!Account.Acct_currently_use_Des__c}"/>
               </apex:pageBlockSectionItem>
 </apex:outputPanel>
Note : I am using these two fields in same pageblocksection.
Alignment is not showing correctly.

 
Shubham_KumarShubham_Kumar
Hi Lakshmi
To solve this problem you will have to do the rendering in another pageblocksection.
Here`s the code, i hope this helps you.
 
<apex:pageBlock >
<apex:pageBlockSection  >
<apex:pageBlockSectionItem >
                    <Label>Account currently use or Not </Label>
                    <apex:actionRegion >
                        <apex:inputField value="{!Account.Account_currently_use__c}">
                            <apex:actionSupport event="onchange" reRender="desc" />
                        </apex:inputField>
                    </apex:actionRegion>
                    
 </apex:pageBlockSectionItem>
 </apex:pageBlockSection>
 <apex:pageBlockSection id="desc"  >
  <!-- <apex:outputPanel  layout="None" > -->
                <apex:pageBlockSectionItem rendered="{!if(Account.Account_currently_use__c == 'Yes',true,false)}" >
                
               <label> Acct currently use(Des) </label> 
           
                    <apex:inputTextarea label="Acct currently use(Des)" cols="50" rows="3" value="{!Account.Acct_currently_use_Des__c}"/>
               </apex:pageBlockSectionItem>
 <!-- </apex:outputPanel> -->
 </apex:pageBlockSection>
 </apex:pageBlock>

Thanks
Shubham Kumar
Lakshmi SLakshmi S
Hi Shubham Kumar,

Thanks for your reply.
Is it possible with in the same pageblock section without using other another pageblock section ?

Thanks,
Lakshmi S.
 
Shubham_KumarShubham_Kumar
Hi Lakshmi

I tried to do it like this but couldn`t. 
But if you are able to achieve this do let me know.

P.S: - Mark the answer as best answer if it helped you.

Thanks 
Shubham Kumar