JSON Grid View

Basic example of usage

The following grid, displays 50 rows on each page from a table of around 4000 records (not indexed).

Note This widget requires special server config:
if (Yii::app()->getRequest()->getIsAjaxRequest()) {
	header( 'Content-type: application/json' );
	$this->renderPartial('_grid', compact('model'));
	Yii::app()->end();
}
ID Name Create Time Edit
 
251Qax2012/08/31 08:29:52 PM
252Qazax2012/08/31 08:29:52 PM
253Qobustan2012/08/31 08:29:52 PM
254Quba2012/08/31 08:29:52 PM
255Qubadli2012/08/31 08:29:52 PM
256Qusar2012/08/31 08:29:52 PM
257Saatli2012/08/31 08:29:52 PM
258Sabirabad2012/08/31 08:29:52 PM
259Saki2012/08/31 08:29:52 PM
260Salyan2012/08/31 08:29:52 PM
261Samaxi2012/08/31 08:29:52 PM
262Samkir2012/08/31 08:29:52 PM
263Samux2012/08/31 08:29:52 PM
264Siyazan2012/08/31 08:29:52 PM
265Sumqayit2012/08/31 08:29:52 PM
266Susa2012/08/31 08:29:52 PM
267Tartar2012/08/31 08:29:52 PM
268Tovuz2012/08/31 08:29:52 PM
269Ucar2012/08/31 08:29:52 PM
270Xacmaz2012/08/31 08:29:52 PM
271Xankandi2012/08/31 08:29:52 PM
272Xanlar2012/08/31 08:29:52 PM
273Xizi2012/08/31 08:29:52 PM
274Xocali2012/08/31 08:29:52 PM
275Xocavand2012/08/31 08:29:52 PM
276Yardimli2012/08/31 08:29:52 PM
277Yevlax2012/08/31 08:29:52 PM
278Zangilan2012/08/31 08:29:52 PM
279Zaqatala2012/08/31 08:29:52 PM
280Zardab2012/08/31 08:29:52 PM
281Federation of Bosnia and Herzegovina2012/08/31 08:29:52 PM
282Republika Srpska2012/08/31 08:29:52 PM
283Christ Church2012/08/31 08:29:52 PM
284Saint Andrew2012/08/31 08:29:52 PM
285Saint George2012/08/31 08:29:52 PM
286Saint James2012/08/31 08:29:52 PM
287Saint John2012/08/31 08:29:52 PM
288Saint Joseph2012/08/31 08:29:52 PM
289Saint Lucy2012/08/31 08:29:52 PM
290Saint Michael2012/08/31 08:29:52 PM
291Saint Peter2012/08/31 08:29:52 PM
292Saint Philip2012/08/31 08:29:52 PM
293Saint Thomas2012/08/31 08:29:52 PM
294Dhaka2012/08/31 08:29:52 PM
295Khulna2012/08/31 08:29:52 PM
296Rajshahi2012/08/31 08:29:52 PM
297Chittagong2012/08/31 08:29:52 PM
298Barisal2012/08/31 08:29:52 PM
299Sylhet2012/08/31 08:29:52 PM
300Antwerpen2012/08/31 08:29:52 PM
$this->widget(
    'booster.widgets.TbJsonGridView',
    array(
        'dataProvider' => $model->search(),
        'filter' => $model,
        'type' => 'striped bordered condensed',
        'summaryText' => false,
        'cacheTTL' => 10, // cache will be stored 10 seconds (see cacheTTLType)
        'cacheTTLType' => 's', // type can be of seconds, minutes or hours
        'columns' => array(
            'id',
            'name',
            array(
                'name' => 'create_time',
                'type' => 'datetime'
            ),
            array(
                'header' => Yii::t('ses', 'Edit'),
                'class' => 'booster.widgets.TbJsonButtonColumn',
                'template' => '{view} {delete}',
                'viewButtonUrl' => null,
                'updateButtonUrl' => null,
                'deleteButtonUrl' => null,
                'buttons' => array(
                    'delete' => array(
                        'click' => 'function(){return false;}'
                    )
                )
            ),
        ),
    )
);