2014-04-02 2 views
0

현재 Yii에서 부트 스트랩 그리드보기를 구현하려고합니다. 이 목록은 잘 작동하지만 필터는부트 스트랩 TB 그리드보기에서 필터가 작동하지 않습니다.

내보기 작동하지 않습니다 : 도움에 미리

<?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 

               ), 
              ),) 

       ), 

)); 

?> 

감사합니다.

답변

1

컨트롤러를 확인하기위한 ...

$model = new YourModel('search'); 
$model->unsetAttributes(); // clear any default values 

if (isset($_GET['YourModel'])) { 
    $model->attributes = $_GET['YourModel']; 
} 

확인 YourModel "기능 검색()" "검색에 안전"필드에 "규칙"에서

확인 YourModel