AutoCountGridView extends CGridView. It works together with AutoCountSqlDataProvider in order to browse large tables without first counting their rows, thus increasing performance.
Requirements ¶
auto count sql data provider extension
Usage ¶
$this->widget('application.extensions.AutoCountGridView', array(
'dataProvider'=>new AutoCountSqlDataProvider(
'tbl_user',
new CDbCriteria(array('condition'=>'column1 is not null')),
false,
array(
'sort'=>array(
'attributes'=>array('column1','column2'),
),
'pagination'=>array(
'pageSize'=>10,
),
)
),
'filter'=>null,
'columns'=>array('column1','column2'),
'selectableRows'=>0,
'template'=>"{summary}\n<div style='overflow:auto'>{items}</div>\n{pager}",
'count_get_variable'=>'count',
));
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.