有没有办法让TbEditableColumn
enabled属性使用表达式而不是布尔值(即:true)
以下是我想要做的一个例子:
array(
'class' => 'bootstrap.widgets.TbEditableColumn',
'name' => 'description',
'editable' => array(
'type' => 'textarea',
'url' => $this->createUrl('classification/update'),
'placement' => 'top',
'enabled' => '($data->status > 0) ? true : false;',
)
),
应该注意的是,这适用于使用bootstrap.widgets.TbButtonColumn
时可用的可见属性,如下所示:
array(
'class' => 'bootstrap.widgets.TbButtonColumn',
'deleteConfirmation' => 'Are you sure you wish to delete this classification?',
'template' => '{delete}',
'buttons'=>array(
'delete' => array(
'visible' => '($data->status > 0) ? true : false;',
)
),
非常感谢任何帮助。