To make a model based check box value checked, use html options: echo $form->checkBoxRow($model,’hidemobile’, array(‘class’=>’checkbox-inline’, ‘checked’=>’checked’));
You may encounter a problem in Yii TbExtendedGridView: TypeError: url is undefined When you click the header or filter on the grid, the solution is simple just add the following to ExtendedGridView. $this->widget(‘bootstrap.widgets.TbExtendedGridView’, array( … ajaxUrl’=> Yii::app()->request->getUrl(), …
Yii model findBySql does not return related data but returns only its own fields. To get around it always use model like: $model = User::model()->with(‘posts’)->find …. Now model fetch related data from posts table as well. However this won’t work. $model = User::model()->findBySql(‘select * from user inner join posts on ….) ….
When using yii csqldataprovider with cgridview in Yii framework and csqldataprovider has sql from related tables you might get the error in the header (edit, delete, update) column. To solve this issue don’t use the default column : array( ‘header’ => Yii::t(‘ses’, ‘Edit’), ‘class’ => ‘bootstrap.widgets.TbButtonColumn’, ), instead use: array( ‘header’ => Yii::t(‘ses’, ‘Edit’), ‘class’
This error will occur when make the 2nd time filter in the TbGridView / TbExtendedGridView after the 1st time filter with ‘no result found’. Solution: Open jquery.ba-bbq.js and goto line 257 and add this coding: if ( url == undefined ) url = window.location.href;
While using Yii framework yiibooster TbJsonGridView we usually face the problem of “Parser error!” when deleting a row from admin view. The problem arises because, after deletion of a row the controller/admin action is called which sends the complete HTML page instead of Json of the table. The solution is very simple and you need