Yii 1.1: auto-count-grid-view

AutoCountGridView works together with AutoCountSqlDataProvider. It displays SQL tables with increased performance.
4 followers

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',
));

Resources

Be the first person to leave a comment

Please to leave your comment.

Create extension