티스토리 뷰

보기 파일 에서이 CGridView 를 사용해 볼 수 있습니다.

$this->widget('zii.widgets.grid.CGridView', array(
            'id'=>'family-record-grid',
                        'dataProvider'=>$model->search(),
                                    'afterAjaxUpdate'   => 'function(){}',
                                                'htmlOptions'       => array('class' => 'form-inline', 'role' => 'grid'),
                                                            'ajaxUrl'           => Yii::app()->createUrl('controllername/actioname'), 
                                                                        'ajaxUpdate'        => true,
                                                                                    'enablePagination'  => true,
                                                                                                "summaryText"       => true,
                                                                                                            'itemsCssClass'     => 'responsive dataTable', // Item CSS Class
                                                                                                                        "template"          => "{items}\n{summary}{pager}",
                                                                                                                                    "summaryText"       => "Showing {start} to {end} of {count} entries",
                                                                                                                                                'pagerCssClass'     => '', // Page CSS Class
                                                                                                                                                            'pager'             => array(
                                                                                                                                                                            'class' => 'CLinkPager',
                                                                                                                                                                                            'maxButtonCount'    => 5,
                                                                                                                                                                                                            'nextPageLabel'     => 'Next',
                                                                                                                                                                                                                            'prevPageLabel'     => 'Prev',
                                                                                                                                                                                                                                            'firstPageLabel'    => 'First',
                                                                                                                                                                                                                                                            'lastPageLabel'     => 'Last',
                                                                                                                                                                                                                                                                        ),
                                                                                                                                                                                                                                                                                    'selectableRows'    => 2,
                                                                                                                                                                                                                                                                                                'enableSorting' => false,
                                                                                                                                                                                                                                                                                                            'columns'=>array()
                                                                                                                                                                                                                                                                                                                        )
                                                                                                                                                                                                                                                                                                                        );
                                                                                                                                                                                                                                                                                                                        


출처
https://stackoverflow.com/questions/39915945
댓글
공지사항
Total
Today
Yesterday
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31