CArrayDataProvider pagination: see all option ?

I am using a CArrayDataProvider with the CListView. Works fine but would like to also have a “See All” option in addition to paging by page. I’m not seeing any option to do this. Any suggestions?

Thanks, Mike

Hmmm there are this post and this one that allow dynamically changing pageSize (number of items per page). Maybe you could just have a standard number (e.g. 10) as the default option of the dropdown (select) and a very big number (or the provider count) as a second option?

Thanks for the info. I’ll take a closer look when I get a chance.

Mike

you mean this?




'dataProvider' => new CArrayDataProvider($posts, array('pagination' => false)),



@mbi

Could you please explain how we can having (quoting) a "See All" option in addition to paging by page, with your code?

I’m curious. I get it that when we set pagination to false, it’s not there at all in the dp. We cannot have it in the view through the widget, or can we?