Yii Framework Forum: How to remove pagination in Tbdetail view - Yii Framework Forum

Jump to content

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

How to remove pagination in Tbdetail view Rate Topic: -----

#1 User is offline   rrbala123 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 97
  • Joined: 19-December 14

Posted 11 March 2015 - 09:00 AM

Hi,

<?php $this->widget('bootstrap.widgets.TbDetailView', array(

'data'=>$model,
'attributes'=>array(
'id',
'bonous_name',
'bonus_amount',
'bonous_percentage',
'definition',

),
)); ?>

I cant remove pagination in tbdetailview,
In model,

return new CActiveDataProvider($this, array(
'criteria'=>$criteria,
'enablePagination '=>false,
and also i changes 'Pagination '=>false,

But i cant remove pagination Why?
0

#2 User is offline   lagogz 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 605
  • Joined: 30-November 12
  • Location:Galiza

Posted 11 March 2015 - 09:16 AM

Hi!

CActiveDataProvider hasn't 'enablePagination' property.

Try this:

return new CActiveDataProvider($this, 
                  array(
                       'criteria'   => $criteria,
                       'pagination' => false,
...


Regards.
-----------------------------------------------------------------------------------------------
------------------------------- VISITEN FOCUCHASART --------------------------------
-----------------------------------------------------------------------------------------------
0

#3 User is offline   rrbala123 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 97
  • Joined: 19-December 14

Posted 11 March 2015 - 09:25 AM

View Postlagogz, on 11 March 2015 - 09:16 AM, said:

Hi!

CActiveDataProvider hasn't 'enablePagination' property.

Try this:

return new CActiveDataProvider($this, 
                  array(
                       'criteria'   => $criteria,
                       'pagination' => false,
...


Regards.



Thanx For Reply,
Ya i tried too('pagination' => false) but cant change anything.
0

#4 User is offline   lagogz 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 605
  • Joined: 30-November 12
  • Location:Galiza

Posted 12 March 2015 - 03:04 AM

View PostGeethasj, on 11 March 2015 - 09:25 AM, said:

Thanx For Reply,
Ya i tried too('pagination' => false) but cant change anything.


bootstrap.widgets.TbDetailView extends from CDetailView. And usually CDetailView is filled with a single model, not CActiveDataProvider.

I don't know how TbDetailView works, sorry.

Regards.
-----------------------------------------------------------------------------------------------
------------------------------- VISITEN FOCUCHASART --------------------------------
-----------------------------------------------------------------------------------------------
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