-
Add 'Select All' functionality in pageBlockTable
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 10 years, 6 months ago by
Shubham.
-
This discussion was modified 10 years, 6 months ago by
Log In to reply.
Popular Salesforce Blogs
Integrating AI into Salesforce CRM: Best Practices
Table of Contents Introduction Best practices for integrating AI into Salesforce CRM Understand Your Business Objectives Choose the Right AI Tools Prepare Your Data Start…
Career Planning in Salesforce (CRM) | What Makes Salesforce Career so Lucrative?
Salesforce is a customer relationship management (CRM) platform that provides a range of tools and technologies for sales, service, marketing, and collaboration. A career in…
Is there a better way to handle callouts in Salesforce?
Recently, I was doing an integration and was faced with a situation that lead me to think, is there a better way to do this,…
Popular Salesforce Videos
Guided Setup with Salesforce Field Service Administration - Webinar Recording
Salesforce Field Service is a complete, end-to-end solution for customer service in the field. Salesforce Field Service brings together customers, employees, and products on a…
What is Record Types in Salesforce?
Record Types is where you have multiple page layouts to a specific profile. Watch this video to learn all about it.
Salesforce Triggers Part-1
A trigger is an Apex script that executes before or after data manipulation language (DML) events occur. Apex triggers enable you to perform custom actions…