【发布时间】:2014-04-02 05:19:10
【问题描述】:
我目前正在尝试在 Yii 中实现引导网格视图。此列表工作正常,但过滤器不起作用,
我的看法:
<?php
$obj=$this->widget('bootstrap.widgets.TbExtendedGridView', array(
'dataProvider'=>$dataProvider,
'type' => 'striped bordered',
'filter' => $model,
'columns'=>array(
array( // display 'create_time' using an expression
'name'=>'host_name',
'value'=>'$data->host_name',
),
array(
'name'=>'host_serviceid',
'value'=>'$data->host_serviceid',
),
array(
'name'=>'status',
'value'=>'$data->status',
),
array(
'class'=>'CButtonColumn',
'template'=>'{edit_date}{update}{delete}',
'htmlOptions'=>array('width'=>'95px'),
'buttons' => array(
'edit_date' => array( //the name {reply} must be same
'label' => 'Add Date', // text label of the button
'url' => 'Yii::app()->createAbsoluteUrl("NimsoftHostsDetails/View", array("id"=>$data->host_id))',
'imageUrl' => Yii::app()->baseUrl.'/images/icons/pencil.png', // image URL of the button. If not set or false, a text link is used, The image must be 16X16 pixels
),
),)
),
));
?>
提前感谢您的帮助。
【问题讨论】:
标签: twitter-bootstrap yii yii-extensions