{yii} CGridView Custom Buttons

Example

	array(
		'class'=>'CButtonColumn',
		'template'=>'{update}{add}{delete}',
		'buttons'=>array(
			'update'=>array(
					'url'=>'$this->grid->controller->createUrl("/Extras/update", array("id"=>$data->id,"asDialog"=>1,"gridId"=>$this->grid->id))',
					'click'=>'function(){$("#cru-frame").attr("src",$(this).attr("href")); $("#cru-dialog").dialog("open");  return false;}',
						'visible'=>'($data->id===null)?false:true;'
					),
			'add' => array(
					'label'=>'Add',
					'imageUrl'=>Yii::app()->request->baseUrl.'/css/gridViewStyle/images/gr-plus.png',
					'url'=>'$this->grid->controller->createUrl("/Extras/create", array("eid"=>$data->extras_id, "bid"=>'.$model->id.', "asDialog"=>1,"gridId"=>$this->grid->id))',
					'click'=>'function(){$("#cru-frame").attr("src",$(this).attr("href")); $("#cru-dialog").dialog("open");  return false;}',
					'visible'=>'($data->id===null)?true:false;'
					),
			'delete'=>array(
					'url'=>'$this->grid->controller->createUrl("/Extras/delete", array("id"=>$data->primaryKey,"asDialog"=>1,"gridId"=>$this->grid->id))',
					),
 
		),
	),

{Yii} How to register Jquery UI – js and css

With Yii 1.1.4, Jquery UI became part of Yii core. To activate JQuery UI, add the following line to your page: Yii::app()->getClientScript()->registerCoreScript( 'jquery.ui' ); If you want a custom style, download a JQuery UI css and add the following line: Yii::app()->getClientScript()->registerCssFile('LINK_TO_YOUR_CSS_FILE'); To use the style sheet that is already shipped with Yii, add the following…