Please mark it as best answer if the information is informative.so that question is removed from an unanswered question and appear as a proper solution.
Pagination is the process of displaying a large number of records and displaying the records on multiple pages within in Salesforce You can change this page according to your requirement.
Pagination using standard set controller May I request you please refer the below link for reference.
- https://hisrinu.wordpress.com/2012/01/09/pagination-using-standardsetcontroller/
- http://www.sfdcpoint.com/salesforce/pagination-using-standard-set-controller-salesforce/
Hope it will be helpful.Please mark it as best answer if the information is informative.so that question is removed from an unanswered question and appear as a proper solution.
Thanks
Rahul Kumar
Hi Devaraj,
Below is the code for the same. It working fine in my Org. I have used it for Standard object Contact.
Visualforce Page:-
<apex:page standardController="Contact" recordSetVar="contacts">
<apex:form >
<apex:pageBlock title="Contact List" id="contacts_list">
Filter:
<apex:selectList value="{! filterId }" size="1">
<apex:selectOptions value="{! listViewOptions }"/>
<apex:actionSupport event="onchange" reRender="contacts_list"/>
</apex:selectList>
<apex:pageBlockTable title="Contacts" value="{!contacts}" var="c">
<apex:column value="{!c.Name}" />
<apex:column value="{!c.Email}" />
<apex:column value="{!c.Account.Name}" />
</apex:pageBlockTable>
<table style="width:100%">
<td align="left"><apex:outputText >Page {! PageNumber } of {! CEILING(ResultSize/PageSize) }</apex:outputText></td>
<td align="center">
<apex:commandLink action="{! previous }" value="« Previous" rendered="{! hasPrevious }" />
<apex:outputText style="color:#ccc" value="« Previous" rendered="{! NOT(hasPrevious) }" />
<apex:commandLink action="{! next }" value="Next »" rendered="{! hasNext }" />
<apex:outputText style="color:#ccc" value="Next »" rendered="{! NOT(hasNext) }" />
</td>
<td align="right">
Records per page:
<apex:selectList value="{! PageSize }" size="1">
<apex:selectOption itemValue="5" itemLabel="5" />
<apex:selectOption itemValue="10" itemLabel="10" />
<apex:selectOption itemValue="20" itemLabel="20" />
<apex:actionSupport event="onchange" reRender="contacts_list" />
</apex:selectList>
</td>
</table>
</apex:pageBlock>
</apex:form>
</apex:page>
Screenshot:-
Regard,
Ajay
Pagination is the process of displaying a large number of records and displaying the records on multiple pages within in Salesforce
You can change this page according to your requirement.
I suggest you visit this link, it will help you
https://mytutorialrack.com/how-to-implement-pagination-in-visualforce-with-example/
http://amitsalesforce.blogspot.com/2015/04/pagination-using-standardsetcontroller.html
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha.