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 |
---|---|---|---|
201 | Salzburg | 2012/08/31 08:29:52 PM | |
202 | Steiermark | 2012/08/31 08:29:52 PM | |
203 | Tirol | 2012/08/31 08:29:52 PM | |
204 | Vorarlberg | 2012/08/31 08:29:52 PM | |
205 | Wien | 2012/08/31 08:29:52 PM | |
206 | Australian Capital Territory | 2012/08/31 08:29:52 PM | |
207 | New South Wales | 2012/08/31 08:29:52 PM | |
208 | Northern Territory | 2012/08/31 08:29:52 PM | |
209 | Queensland | 2012/08/31 08:29:52 PM | |
210 | South Australia | 2012/08/31 08:29:52 PM | |
211 | Tasmania | 2012/08/31 08:29:52 PM | |
212 | Victoria | 2012/08/31 08:29:52 PM | |
213 | Western Australia | 2012/08/31 08:29:52 PM | |
214 | Abseron | 2012/08/31 08:29:52 PM | |
215 | Agcabadi | 2012/08/31 08:29:52 PM | |
216 | Agdam | 2012/08/31 08:29:52 PM | |
217 | Agdas | 2012/08/31 08:29:52 PM | |
218 | Agstafa | 2012/08/31 08:29:52 PM | |
219 | Agsu | 2012/08/31 08:29:52 PM | |
220 | Ali Bayramli | 2012/08/31 08:29:52 PM | |
221 | Astara | 2012/08/31 08:29:52 PM | |
222 | Baki | 2012/08/31 08:29:52 PM | |
223 | Balakan | 2012/08/31 08:29:52 PM | |
224 | Barda | 2012/08/31 08:29:52 PM | |
225 | Beylaqan | 2012/08/31 08:29:52 PM | |
226 | Bilasuvar | 2012/08/31 08:29:52 PM | |
227 | Cabrayil | 2012/08/31 08:29:52 PM | |
228 | Calilabad | 2012/08/31 08:29:52 PM | |
229 | Daskasan | 2012/08/31 08:29:52 PM | |
230 | Davaci | 2012/08/31 08:29:52 PM | |
231 | Fuzuli | 2012/08/31 08:29:52 PM | |
232 | Gadabay | 2012/08/31 08:29:52 PM | |
233 | Ganca | 2012/08/31 08:29:52 PM | |
234 | Goranboy | 2012/08/31 08:29:52 PM | |
235 | Goycay | 2012/08/31 08:29:52 PM | |
236 | Haciqabul | 2012/08/31 08:29:52 PM | |
237 | Imisli | 2012/08/31 08:29:52 PM | |
238 | Ismayilli | 2012/08/31 08:29:52 PM | |
239 | Kalbacar | 2012/08/31 08:29:52 PM | |
240 | Kurdamir | 2012/08/31 08:29:52 PM | |
241 | Lacin | 2012/08/31 08:29:52 PM | |
242 | Lankaran | 2012/08/31 08:29:52 PM | |
243 | Lerik | 2012/08/31 08:29:52 PM | |
244 | Masalli | 2012/08/31 08:29:52 PM | |
245 | Mingacevir | 2012/08/31 08:29:52 PM | |
246 | Naftalan | 2012/08/31 08:29:52 PM | |
247 | Naxcivan | 2012/08/31 08:29:52 PM | |
248 | Neftcala | 2012/08/31 08:29:52 PM | |
249 | Oguz | 2012/08/31 08:29:52 PM | |
250 | Qabala | 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;}' ) ) ), ), ) );