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

Disabling selected checkboxes within SelectCheckBoxes component

Hello Friends,


I have a very generic requirement which i am unable to achieve. This is regarding the "SelectCheckboxes" VF component.


Below is the code which i am using:-


<apex:selectcheckboxes value="{!Values}" layout="PageDirection" > <apex:selectOptions value="{!ValueOptions}" /> </apex:selectcheckboxes>


The requirement is that i want to disable some of the checkboxes within this component depending on some criteria.


I tried using the "Disabled" attribute but it disables all the checkboxes instead of disabling selected ones. Is there a way i can achieve this??


Please let me know.


Many Thanks,



You would have to handle that in the controller.Try doing this.


if(<some condition>)





I hope this one solves it..