PHP开发实例大全(提高卷) 中文完整pdf扫描版[244MB]
Create custom button with AJAX function in CGridView
First we need to create the required action in our controller, we will call it simply ‘status’. To begin we add it in our controller rules ‘actions’ array:
array ( 'allow' 'actions' => array ( 'view' , 'update' , 'delete' , 'status' )), 'users' => array ( 'admin' ), ), Next we need to create an action for setting our record status:
|
Now we are ready to create our custom button. If you look at a standard Yii generated cGridview, toward the bottom you
转载请注明:谷谷点程序 » Create custom button with AJAX function in CGridView