2015-06-11 35 views
0

在我的新Yii應用它顯示爲,警予cgridview顯示summaryt文本兩次

Displaying 1-3 of 1 result.|Displaying 1-3 of 3 results. 

<div class="summary">Displaying 1-3 of 1 result.|Displaying 1-3 of 3 results.</div> 

我不知道這部分是如何複製的,這是我的代碼。

<?php $this->widget('zii.widgets.grid.CGridView', array(
    'id'=>'data-grid', 
    'dataProvider'=>$model->search(), 
    'filter'=>$model, 
    'columns'=>array(
     array(
      'name' => 'id', 
      'header' => 'No.', 
      'htmlOptions' => array('style' => 'width: 5%;'), 
     ), 
     array(
      'name' => 'type', 
      'value' => '$data->getType($data->type)' 
     ), 
     array(
      'name' => 'incidentType', 
      'value' => '$data->getIncidentType($data->incidentType)' 
     ), 

回答

1

儘量增加你的內部選項cgridview此選項:

'summaryText'=> "Displaying {start} - {end} of {count} result."