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
suman myanasuman myana 

how to disable command button based on input check box in vf

<apex:commandButton styleClass="select-block-button" value="{!$Label.Select_Button}" action="{!selectedProducts}"  id="myCmdButton" disabled="false"  />









<apex:column >
                    
                    <apex:inputCheckbox styleClass="" value="{!productVar.aCheckBox}" immediate="true" />
                </apex:column>

 
Best Answer chosen by suman myana
ajay rawat 14ajay rawat 14
HI Suman,

There are two ways to impement this approach.
1) Use javaScript and disable button depending upod checkbox check action.
2) Use apex:ActionRegion to partial re render small section which include command button.

Try to avoid 2 option to, Because it increses server hit.

Thanks
Ajay Rawat