Minggu, 19 Maret 2017

CGridView

  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))',
          ),
    ),
  ),

0 komentar:

Posting Komentar