+ Start a Discussion

Freeze a Column in a Table

Hi All,

We have a Table which has a columns containing a link which navigates to a Page when the link (Button) is clicked. We need to freeze the Actions in the row (i.e disable Picklists,Links and Disable only specific values in another picklist ) based on the status (a custom text field ) literally to be "Complete" status. When the Row status is Complete the fields should be disabled.

Could someone please guide us in achieving this.

Thank you for your support,

SonamSonam (Salesforce Developers) 
Check the below sample VF code:

The buttons(Accept and reject) are present for each row in the table and they can be disabled depending on the value of this disablebutton property of the controller.

You can map your button in a similar way to the record field such that when the record is marked completed - it can change the value of disablebutton property hence d isabling the button in the row.

<apex:column headerValue="Action" >
<!-- Button to Accept a Deal and create an Accepted Deal Action record  -->

                              <apex:commandButton value="Accept" disabled="{!DealMapWrapper[d].disablebutton}" action="{!CreateAcceptDealAction}" reRender="myPanel,totalsummary,tsummary">

                                    <apex:param name="ADealID" assignto="{!DealID}" value="{!DealMapWrapper[d].deal.id}"></apex:param>                            


                              <!-- Button to Reject a Deal and create an Rejected Deal Action record -->

                              <apex:commandButton value="Reject" disabled="{!DealMapWrapper[d].disablebutton}" action="{!CreateRejectDealAction}" reRender="myPanel,totalsummary,tsummary">   

                                    <apex:param name="RDealID" assignto="{!DealID}" value="{!DealMapWrapper[d].deal.id}"></apex:param>