-
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 8 years ago by Shubham.
Log In to reply.
Popular Salesforce Blogs
Schedule Apex in Salesforce | Apex Developer Guide
Schedule Apex in Salesforce If you want to run apex classes at a specific time then we use schedule apex. If you want to schedule…
Utility Class to Get Object Metadata - A Comprehensive Guide
Introduction In Salesforce development, Utility Classes play a crucial role in centralizing and organizing commonly used code logic, making the codebase more maintainable, readable, and…
How To Use Picklists In Salesforce Marketing Cloud
Picklists you say? Picklists are basically dropdowns used to let users choose from a series of values. Picklists can help you simplify data entry (time…
Popular Salesforce Videos
Salesforce Summer ’22 Release | Flow Enhancement of Summer 22 Release with Example
Exceed your business goals with the Summer ’22 release by seamlessly integrating your data, finding meaningful insights, and building lifelong customer relationships. How to Use…
Unleash the Power of Compare Tables | Salesforce Video
In this video, you will learn how to use compare tables to calculate complex calculations quickly, which you can then use to visualize your data.…
What Are Roll-Up Summary Fields in Salesforce? | Video Tutorial
A roll-up summary field calculates values from related records, such as those in a related list. You can create a roll-up summary field to display…