Reusing Cactivedataprovider's Filters And Sort Attributes Outside Of Gridview

Hello!

I have a CGridView and a CActiveDataProvider.

Please help me out with reusing that dataprovider outside of gridview.

So, I have a table, filtered and sorted some way. After the filtering and sorting, the user clicks the ‘print all’ button.

I need to load the models in the actionPrint method based on the filter and sort attributes.

How can I reuse my dataprovider in that method?

Hi

The extension EExcelView may be a source of inspiration for you.

EExcelView extends CGridView. It displays the data as CGridView does, but provides buttons to generate CSV, XLS, … files.

You could create your EPrintView to print data…