Greetings,
CoLT
Posted 25 November 2010 - 06:48 AM
$this->setTotalItemCount(count($this->rawData));
Posted 27 November 2010 - 02:47 PM
Yeti, on 25 November 2010 - 06:48 AM, said:
$this->setTotalItemCount(count($this->rawData));
$this->getTotalItemCount(true);for this, so the internal calculateTotalItemCount() function is used.
Posted 02 March 2011 - 03:47 AM
Posted 02 March 2011 - 03:09 PM
ApActiveDataProvider(get_class($this), array(
'alphapagination'=>array(
'pagination'=>array(
'pageSize'=> Yii::app()->user->getState('pageSize',Yii::app()->params['defaultPageSize']),
),
...
),
...
);
Posted 03 March 2011 - 09:58 AM
return new ApActiveDataProvider(get_class($this), array(
'criteria'=>$criteria,
'alphapagination'=>array(
'attribute'=>'name',
'activeCharSet'=>$activeChars
),
'pagination'=>array(
'pageSize'=> Yii::app()->user->getState('pageSize',
Yii::app()->params['defaultPageSize']),
),
));
...
if (isset($_GET['pageSize'])) {
Yii::app()->user->setState('pageSize',(int)$_GET['pageSize']);
unset($_GET['pageSize']);
}
else {
Yii::app()->user->setState('pageSize',Yii::app()->params['defaultPageSize']);
}
...
$merge=new CDbCriteria;
if(!Yii::app()->request->isAjaxRequest)
$merge->order = '`name` ASC';
...
else {
Yii::app()->user->setState('pageSize',Yii::app()->params['defaultPageSize']);
}
if(!Yii::app()->request->isAjaxRequest)
$merge->order = '`name` ASC';
yoshi, on 02 March 2011 - 03:09 PM, said:
ApActiveDataProvider(get_class($this), array(
'alphapagination'=>array(
'pagination'=>array(
'pageSize'=> Yii::app()->user->getState('pageSize',Yii::app()->params['defaultPageSize']),
),
...
),
...
);
Posted 03 March 2011 - 02:15 PM
Daniel, on 03 March 2011 - 09:58 AM, said:
return new ApActiveDataProvider(get_class($this), array( 'alphapagination'=>array( .... ), 'pagination'=>array( 'pageSize'=> 10, ), ));
return new ApActiveDataProvider(get_class($this), array(
'alphapagination'=>array(
....
'pagination'=>array(
'pageSize'=> 10,
),
),
));
Daniel, on 03 March 2011 - 09:58 AM, said:
Posted 05 March 2011 - 05:56 PM
Posted 06 March 2011 - 06:55 AM
Daniel, on 05 March 2011 - 05:56 PM, said:
<?php $this->widget('ApGridView', array(
'id'=>'myGrid',
'dataProvider'=>$model->search(),
'filter'=>$model,
'template'=>"{summary}\n{alphapager}{pager}\n{items}",
'alphaPager'=>array(
'showNumPage'=>'true',
'header'=>'Index: ' // <=====Setting different header text
),
....
?>
Posted 13 June 2011 - 09:39 AM
public function search()
{
// Warning: Please modify the following code to remove attributes that
// should not be searched.
Yii::import('application.extensions.alphapager.ApActiveDataProvider');
$criteria=new CDbCriteria;
$criteria->compare('id',$this->id);
$criteria->compare('name',$this->name,true);
$criteria->compare('sef_name',$this->sef_name,true);
//return new CActiveDataProvider(get_class($this), array(
return new ApActiveDataProvider(get_class($this), array(
'criteria'=>$criteria,
'alphapagination'=>array(
'attribute'=>'name',
),
));
}<?php $this->widget('application.extensions.alphapager.ApListView', array(
'dataProvider'=>$dataProvider,
'itemView'=>'_view',
'template'=>"{alphapager}\n{pager}\n{items}",
)); ?>Error 500 CActiveDataProvider does not have a method named "getAlphaPagination".
Posted 13 June 2011 - 10:45 AM
$dataProvider=new CActiveDataProvider....?!
public function actionYourAction()
{
$model=new YourModel('search');
$model->unsetAttributes(); // clear any default values
$this->render('YourView',array(
'model'=>$model,
));
}<?php $this->widget('application.extensions.alphapager.ApListView', array(
'id'=>'myListView',
'dataProvider'=>$model->search(),
'itemView'=>'_view',
'template'=>"{alphapager}\n{pager}\n{items}",
/* ... */
)); ?>
Posted 13 June 2011 - 06:57 PM
Posted 13 June 2011 - 09:06 PM
Posted 16 June 2011 - 12:04 PM
<?php $this->widget('application.extensions.alphapager.ApListView', array(
'dataProvider'=>$dataProvider,
'itemView'=>'_view',
'template'=>"{alphapager}\n{pager}\n{items}",
'alphaPager'=>array('showNumPage'=>true) // <==== here
)); ?>
Posted 25 July 2011 - 03:06 PM
Posted 25 October 2011 - 03:35 AM
Posted 03 December 2012 - 10:40 PM
Posted 28 January 2013 - 08:26 AM
array( ... 'ajaxUrl' => '/controller/action' ... )