You need to sign in to do that
Don't have an account?
raj kiran
Standard set controller dynamic page sizing
Hi All,
I am using the standard set controller to dispaly a list of records and do the pagination.
Here i need to set the page size of the dispalyed records per page dynamically. eg like an selectlist values from vf
like select records/page dropdown to value having 10,20,50 and upon the selection by submiting some(update button) the number of records per page shoud get updated.
i have seen a post here :
http://saramorgan.net/2014/11/11/pagination-and-the-standardsetcontroller-no-custom-controller-required/
which has the same funcationality i am looking for however he has used the standard opptunity controller to acheive it. in my case i am using the custom controller and using the standard set controller to acheive it.
can any one let me know how can i acheive the dynamic paging size from vf using the stadard set controller ?
Regards
Raj
I am using the standard set controller to dispaly a list of records and do the pagination.
Here i need to set the page size of the dispalyed records per page dynamically. eg like an selectlist values from vf
like select records/page dropdown to value having 10,20,50 and upon the selection by submiting some(update button) the number of records per page shoud get updated.
i have seen a post here :
http://saramorgan.net/2014/11/11/pagination-and-the-standardsetcontroller-no-custom-controller-required/
which has the same funcationality i am looking for however he has used the standard opptunity controller to acheive it. in my case i am using the custom controller and using the standard set controller to acheive it.
can any one let me know how can i acheive the dynamic paging size from vf using the stadard set controller ?
Regards
Raj
Below is the code with selectlist.
Best Regards,
Mithun.
All Answers
you can set page size for standardsetcontroller
https://www.salesforce.com/us/developer/docs/pages/Content/apex_ApexPages_StandardSetController_methods.htm
using standardsetcontroller.setPageSize(Integer pageSize)
here, you can use this pagesize as a variable and assign it from the dropdown and refresh records to the standardsetcontroller
Thanks
Choose it as best answer if it has helped you
Below is the code with selectlist.
Best Regards,
Mithun.
Thanks that helped me a lot.
I have used the standard set controller and implented the pagination to the results. however i am looking forward to implmenet the search for the presented data also but i dont have any idea for search. Can you share any information on this.