1

我有一个 CGridView 如下,

<?php $this->widget('zii.widgets.grid.CGridView', array(
'id'=>'order-grid',
'dataProvider'=>$model->search(),
'filter'=>$model,
'columns'=>array(
    'order_id',
    //'ordered_datetime',
    'customer_id',
    'status',
    //'delivery_address',
    array(
        'class'=>'CButtonColumn',
        'template' => '{view} {rollback} {receive}{pack} {dispatch}{delivered}',
        'htmlOptions'=>array('width'=>'250px'),
        'buttons'=>array(
            'receive'=>array(
                'id'=>'receive',
                'name'=>'receive',
                'url'=>'$this->grid->controller->createUrl("/shop/order/admin&received=true", array("id"=>$data->order_id,"asDialog"=>1,"gridId"=>$this->grid->id))',
                'type'=>'submit',
                'imageUrl'=>'/mdg/images/Receive1.png',
                'visible'=>'($data->status=="pending")?true:false;'
             ),
                             'rollback'=>array(
                'id'=>'rollback',
                'name'=>'rollback',
                                     'click'=>''
                'url'=>'$this->grid->controller->createUrl("/shop/order/admin&rollback=true", array("id"=>$data->order_id,"asDialog"=>1,"gridId"=>$this->grid->id))',
                'imageUrl'=>'/mdg/images/rollback.jpg',
                'visible'=>'($data->status=="pending")?false:true;'
             ),


        ),
    ),
),
)); ?>

当我向按钮数组添加一个按钮时,过滤器不起作用。任何想法为什么会这样?

4

1 回答 1

0

按钮的数组中有一个额外click => '',的。recieve

于 2012-06-05T16:38:11.620 回答