AutoCountGridView extends CGridView. It works together with AutoCountSqlDataProvider in order to browse large tables without first counting their rows, thus increasing performance.
auto count sql data provider extension
$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', ));
Be the first person to leave a comment
Please login to leave your comment.