ads

Thursday 18 August 2016

Select All Checkbox Using One CheckBox




Static Resource -

Download file and Save in Static Resource :- Download Link





Visualforce Page :-


<apex:page standardController="account">
 

 <apex:includeScript value="{!$Resource.home2}"/>

<script>
$(document).ready(function () {
    $(".ckbCheckAll").click(function () {
        $(".checkBoxClass").prop('checked', $(this).prop('checked'));
        $(".checkBoxClass1").prop('checked', $(this).prop('checked'));
        $(".checkBoxClass2").prop('checked', $(this).prop('checked'));
    });


    
});
</script>

<apex:form >
<apex:pageBlock >
<apex:pageBlockSection >

 
     <apex:inputCheckbox value="{!account.Check_All__c}"  styleClass="ckbCheckAll" /> 
 
      <apex:inputCheckbox value="{!account.salesforce__c}" styleClass="checkBoxClass"  /> 

      <apex:inputCheckbox value="{!account.PHP__c}" styleClass="checkBoxClass1" /> 

      <apex:inputCheckbox value="{!account.Java__c}" styleClass="checkBoxClass2" /> 
      

  
   
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>

Screenshot 1 :-



Screenshot 2:-


No comments:

Post a Comment