Home> php教程> PHP开发> body text

Yii view CGridView implements operation button definition address example

高洛峰
Release: 2016-12-30 16:12:43
Original
1278 people have browsed it

The example of this article describes the method of defining the address of the operation button in the Yii view CGridView. Share it with everyone for your reference, the details are as follows:

widget('zii.widgets.grid.CGridView', array( 'id'=>'mem-sub-grid', 'dataProvider'=>$model, 'columns'=>array( 'zpc_catname', array('name'=>'inputtime', 'value'=>'date("y-m-d H:m",$data->inputtime)', 'htmlOptions'=>array('class'=>'t_c'), ), array( 'class'=>'CButtonColumn', //注意URL规则 'updateButtonUrl'=>'Yii::app()->controller->createUrl("updaterole",array("id"=>$data->primaryKey))', 'deleteConfirmation'=>'确认删除',//删除操作弹框提示的信息 'buttons'=>array( 'view'=>array('visible'=>'false'), //注意URL规则, 'dalete'=>array('url'=>'Yii::app()->controller->createUrl("deleterole",array("id"=>$data->primaryKey))') ), ), ), )); ?>
Copy after login

I hope this article will be helpful to everyone’s PHP program design based on the Yii framework.

For more Yii view CGridView implementation operation button definition address examples and related articles, please pay attention to the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!