Yii Framework Forum: No Pagination on CGridView - Yii Framework Forum

Jump to content

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

No Pagination on CGridView Rate Topic: -----

#1 User is offline   cloud3peace 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 12
  • Joined: 22-October 10
  • Location:Jakarta, Indonesia

Posted 02 November 2010 - 11:29 PM

is there anyway to remove the pagination on CGridView and show all row in one page?

i already try to use pageSize with value 0 but it doesn't show all row in one page.

thanks...
0

#2 User is offline   Maurizio Domba Cerin 

  • Yii - Yesss It Is !!!
  • Yii
  • Group: Yii Dev Team
  • Posts: 4,346
  • Joined: 12-October 09
  • Location:Croatia

Posted 03 November 2010 - 02:34 AM

For the CActiveDataProvider set 'pagination' to false - http://yiiframework....gination-detail
Find more about me.... btw. Do you know your WAN IP?
3

#3 User is offline   zaccaria 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 2,232
  • Joined: 04-October 09
  • Location:Moscow

Posted 03 November 2010 - 02:37 AM

what about CGridView::enablePagination or CActiveDataProvider::pagination.
0

#4 User is offline   cloud3peace 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 12
  • Joined: 22-October 10
  • Location:Jakarta, Indonesia

Posted 03 November 2010 - 11:27 PM

thanks for reply...

and i made it!!!

just set pagination to false...

thanks for help...
0

#5 User is offline   suparmanto 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 03-August 11

Posted 05 October 2011 - 03:45 AM

View Postcloud3peace, on 03 November 2010 - 11:27 PM, said:

thanks for reply...

and i made it!!!

just set pagination to false...

thanks for help...



Hi all,

hi cloud3peace, what version do you have?

I use Yii 1.1.8 and your trick not working.
change the property enablePagination to false ('enablePagination'=>false), only hide pagination and the number of row still 10 in a page.

and this kind not working too
...in CGridview...
'pager'=>array(
      'class'=>'CLinkPager',
      'pageSize'=>'0',
)
....


this not working too
return new CActiveDataProvider($this, array(
			'criteria'=>$criteria,
			'pagination'=>array(
			     'pageSize'=>'0',
			),    
		));


and this raise error
return new CActiveDataProvider($this, array(
			'criteria'=>$criteria,
			'pagination'=>false,    
		));


Anyone have another trick? Please help...
I need showing all record in one page with CGridview
1

#6 User is offline   jairbatista81 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 05-November 12

Posted 16 November 2012 - 01:14 PM

View PostMaurizio Domba, on 03 November 2010 - 02:34 AM, said:

For the CActiveDataProvider set 'pagination' to false -

Thank you, worked for me!
0

#7 User is offline   Nisanth thulasi 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 62
  • Joined: 10-July 12
  • Location:Kochi

Posted 24 January 2013 - 12:30 AM


<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'mail-parser-grid',
	'dataProvider'=>$model->search(),
	[b] 'enablePagination' => false,[/b]
	'columns'=>array(
		'max_mails_per_process',
		'message_size_limit',
		'content_type',
		'update_date',
		'ticketid_type',
		
		array(
			'class'=>'CButtonColumn', 'template'=>'{view}{update}',
		),





	      
	),
)); ?>

Thanks
Nisanth Thulasi
0

#8 User is offline   Azy 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 156
  • Joined: 16-May 12

Posted 24 January 2013 - 04:24 AM

you can also achieve the same with this...

$dp = $model->search();
[size=2]$dp->pagination->pageSize = $model->count();[/size]


1

#9 User is offline   Riprios 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 01-November 13

Posted 01 November 2013 - 04:44 AM

This works thank you!

View PostNisanth thulasi, on 24 January 2013 - 12:30 AM, said:


<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'mail-parser-grid',
	'dataProvider'=>$model->search(),
	[b] 'enablePagination' => false,[/b]
	'columns'=>array(
		'max_mails_per_process',
		'message_size_limit',
		'content_type',
		'update_date',
		'ticketid_type',
		
		array(
			'class'=>'CButtonColumn', 'template'=>'{view}{update}',
		),





	      
	),
)); ?>


0

#10 User is offline   Bear L 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 28-March 14

Posted 18 April 2014 - 04:56 PM

View PostAzy, on 24 January 2013 - 04:24 AM, said:

you can also achieve the same with this...

$dp = $model->search();
[size=2]$dp->pagination->pageSize = $model->count();[/size]




I am using Yii 1.1.14, and this is the only solution on this page that worked for me! THANK YOU!
0

Share this topic:


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

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