加载中...

Yii-视图- CGridView操作按钮定义地址


  1. <?php $this->widget('zii.widgets.grid.CGridView', array(
  2. 'id'=>'mem-sub-grid',
  3. 'dataProvider'=>$model,
  4. 'columns'=>array(
  5. 'zpc_catname',
  6. array('name'=>'inputtime',
  7. 'value'=>'date("y-m-d H:m",$data->inputtime)',
  8. 'htmlOptions'=>array('class'=>'t_c'),
  9. ),
  10. array(
  11. 'class'=>'CButtonColumn',
  12. //注意URL规则
  13. 'updateButtonUrl'=>'Yii::app()->controller->createUrl("updaterole",array("id"=>$data->primaryKey))',
  14. 'deleteConfirmation'=>'确认删除',//删除操作弹框提示的信息
  15. 'buttons'=>array(
  16. 'view'=>array('visible'=>'false'),
  17. //注意URL规则,
  18. 'dalete'=>array('url'=>'Yii::app()->controller->createUrl("deleterole",array("id"=>$data->primaryKey))')
  19. ),
  20. ),
  21. ),
  22. )); ?>



还没有评论.