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 |
---|---|---|---|
151 | Syunik' | 2012/08/31 08:29:52 PM | |
152 | Tavush | 2012/08/31 08:29:52 PM | |
153 | Vayots' Dzor | 2012/08/31 08:29:52 PM | |
154 | Yerevan | 2012/08/31 08:29:52 PM | |
155 | Benguela | 2012/08/31 08:29:52 PM | |
156 | Bie | 2012/08/31 08:29:52 PM | |
157 | Cabinda | 2012/08/31 08:29:52 PM | |
158 | Cuando Cubango | 2012/08/31 08:29:52 PM | |
159 | Cuanza Norte | 2012/08/31 08:29:52 PM | |
160 | Cuanza Sul | 2012/08/31 08:29:52 PM | |
161 | Cunene | 2012/08/31 08:29:52 PM | |
162 | Huambo | 2012/08/31 08:29:52 PM | |
163 | Huila | 2012/08/31 08:29:52 PM | |
164 | Malanje | 2012/08/31 08:29:52 PM | |
165 | Namibe | 2012/08/31 08:29:52 PM | |
166 | Moxico | 2012/08/31 08:29:52 PM | |
167 | Uige | 2012/08/31 08:29:52 PM | |
168 | Zaire | 2012/08/31 08:29:52 PM | |
169 | Lunda Norte | 2012/08/31 08:29:52 PM | |
170 | Lunda Sul | 2012/08/31 08:29:52 PM | |
171 | Bengo | 2012/08/31 08:29:52 PM | |
172 | Luanda | 2012/08/31 08:29:52 PM | |
173 | Buenos Aires | 2012/08/31 08:29:52 PM | |
174 | Catamarca | 2012/08/31 08:29:52 PM | |
175 | Chaco | 2012/08/31 08:29:52 PM | |
176 | Chubut | 2012/08/31 08:29:52 PM | |
177 | Cordoba | 2012/08/31 08:29:52 PM | |
178 | Corrientes | 2012/08/31 08:29:52 PM | |
179 | Distrito Federal | 2012/08/31 08:29:52 PM | |
180 | Entre Rios | 2012/08/31 08:29:52 PM | |
181 | Formosa | 2012/08/31 08:29:52 PM | |
182 | Jujuy | 2012/08/31 08:29:52 PM | |
183 | La Pampa | 2012/08/31 08:29:52 PM | |
184 | La Rioja | 2012/08/31 08:29:52 PM | |
185 | Mendoza | 2012/08/31 08:29:52 PM | |
186 | Misiones | 2012/08/31 08:29:52 PM | |
187 | Neuquen | 2012/08/31 08:29:52 PM | |
188 | Rio Negro | 2012/08/31 08:29:52 PM | |
189 | Salta | 2012/08/31 08:29:52 PM | |
190 | San Juan | 2012/08/31 08:29:52 PM | |
191 | San Luis | 2012/08/31 08:29:52 PM | |
192 | Santa Cruz | 2012/08/31 08:29:52 PM | |
193 | Santa Fe | 2012/08/31 08:29:52 PM | |
194 | Santiago del Estero | 2012/08/31 08:29:52 PM | |
195 | Tierra del Fuego | 2012/08/31 08:29:52 PM | |
196 | Tucuman | 2012/08/31 08:29:52 PM | |
197 | Burgenland | 2012/08/31 08:29:52 PM | |
198 | Karnten | 2012/08/31 08:29:52 PM | |
199 | Niederosterreich | 2012/08/31 08:29:52 PM | |
200 | Oberosterreich | 2012/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;}' ) ) ), ), ) );