Yii Framework Forum: Is there a tutorial available on how to use pagination? - Yii Framework Forum

Jump to content

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

Is there a tutorial available on how to use pagination? Rate Topic: -----

#1 User is offline   mydarkpassenger 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 16
  • Joined: 26-April 10

Posted 30 April 2010 - 04:30 PM

I'm looking for a guide to use pagination but I haven't found one. Can anyone point me at one?
0

#2 User is offline   james2010 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 48
  • Joined: 19-February 10

Posted 09 May 2010 - 07:50 AM

example


$dataProvider=new CActiveDataProvider('products', array('pagination'=>array(
					'pageSize'=>'2')));?>



so you can use it with Grid or ListView


<?php $this->widget('zii.widgets.CListView', array(
	'dataProvider'=>$dataProvider,
	'itemView'=>'_view',  
	)); ?>


grid
$this->widget('zii.widgets.grid.CGridView', array(
	'dataProvider'=>$dataProvider,


and the best is you have get ajax already. if you havent javascript activate in browser.

it works too.
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