Yii Framework Forum: Reusing Cactivedataprovider's Filters And Sort Attributes Outside Of Gridview - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Reusing Cactivedataprovider's Filters And Sort Attributes Outside Of Gridview Rate Topic: -----

#1 User is offline   heal 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 37
  • Joined: 08-December 10
  • Location:Slovakia

Posted 04 July 2014 - 07:00 AM

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?
0

#2 User is offline   le_top 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 366
  • Joined: 08-June 10
  • Location:France (Ile-de-France/Val d'Oise)

Posted 05 July 2014 - 05:37 PM

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...
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users