在我的新yii应用程序中,它显示为,
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)'
),
答案 0 :(得分:1)
尝试在cgridview选项中添加此选项:
'summaryText'=> "Displaying {start} - {end} of {count} result."