Extensions
- Data Extensions
- Form Extensions
- JQuery Tricks
Batch menu
View code
$this->widget('ext.widgets.bmenu.XBatchMenu', array( 'formId'=>'person-form', 'checkBoxId'=>'person-id', 'ajaxUpdate'=>'person-grid', // if you want to update grid by ajax 'emptyText'=>Yii::t('ui','Please check items you would like to perform this action on!'), 'confirm'=>Yii::t('ui','Are you sure to perform this action on checked items?'), 'items'=>array( array('label'=>Yii::t('ui','Make selected persons 1 year younger'),'url'=>array('updateYears','op'=>'more')), array('label'=>Yii::t('ui','Make selected persons 1 year older'),'url'=>array('updateYears','op'=>'less')), ), 'htmlOptions'=>array('class'=>'actionBar'), )); echo CHtml::beginForm('','post',array('id'=>'person-form')); $this->widget('zii.widgets.grid.CGridView', array( 'id'=>'person-grid', 'dataProvider'=>$model->search(), 'selectableRows'=>2, // multiple rows can be selected 'columns'=>array( array( 'class'=>'CCheckBoxColumn', 'id'=>'person-id', ), 'lastname', 'firstname', 'birthyear', array( 'name'=>'country_id', 'value'=>'$data->country->name', ), array( 'name'=>'eyecolor_code', 'value'=>'Lookup::item("eyecolor",$data->eyecolor_code)', ), ), )); echo CHtml::endForm();

Visual Yii