Activity Forums Salesforce® Discussions Add 'Select All' functionality in pageBlockTable

  • Add 'Select All' functionality in pageBlockTable

    Posted by Shubham on April 26, 2016 at 10:05 am

    How can i add 'Select All' 'Deselect All' functionality to pageblocktable which is iterating a wrapper list (checkbox and list of products). Like when inputcheckbox with id="mainbox" is checked all the inputcheckbox with id = "checkbox" should get selected.

    <apex:pageBlockTable value="{!wrapProductList}" var="prd" title="Products" id="prdtList">
    <apex:column >
    <apex:facet name="header"><apex:inputCheckbox id="mainBox"/></apex:facet>
    <apex:inputCheckbox value="{!prd.isSelected}" id="checkBox"/>
    </apex:column>
    <apex:column >
    <apex:facet name="header">Product Name</apex:facet>
    <apex:outputText value="{!prd.prdt.Name}"/>
    </apex:column>
    <apex:column >
    <apex:facet name="header">Product code</apex:facet>
    <apex:outputText value="{!prd.prdt.ProductCode}"/>
    </apex:column>
    <apex:column >
    <apex:facet name="header">Sales Price</apex:facet>
    <apex:outputText value="{!prd.prdt.UnitPrice}"/>
    </apex:column>
    </apex:pageBlockTable>

    • This discussion was modified 8 years, 6 months ago by  Shubham.
    Ravi replied 8 years, 6 months ago 2 Members · 1 Reply
  • 1 Reply

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos

Free 5 Day Salesforce Challenge!

Video in

To access the signup form head over to www.talentstacker.com/Salesforce TalentStacker Podcast Salesforce Episode: https://talentstacker.libsyn.com/how-to-earn-60k-100k-a-year-within-6-months-without-a-college-degree-say-what-salesforce-career-development-path-with-bradley-rice Do you already have a job as a Salesforce Professional and…