how to remove the message showing thenumber of results in cgridview.
I’ve tried ‘summaryText’=>’’
but it return "CGridView.summaryText " is not defined
how to remove the message showing thenumber of results in cgridview.
I’ve tried ‘summaryText’=>’’
but it return "CGridView.summaryText " is not defined
That should work. Can you copy and paste the exact code from your view?
<?php
$this->widget('application.extensions.grid.CGridView', array('showTableOnEmpty' => FALSE,
'id' => 'utilizadores-grid',
'dataProvider' => $model->search(),
//'filter'=>$model,
//'summaryText '=>'',
'columns' => array(
'nome',
'username',
'password',
'ativo',
'tipoUtilizador.designacao',
array(
'class' => 'CButtonColumn',
'template' => '{update}{delete}',
'delete' => array(
'url' => 'Yii::app()->createUrl("utilizadores/delete", array("id"=>$data->id_utilizador))',
'imageUrl' => '/images/delete.png'
),
'update' => array(
'url' => 'Yii::app()->createUrl("utilizadores/update", array("id"=>$data->id_utilizador))',
'submit' => 'post',
'imageUrl' => '/images/page_white_edit.png'
),
),
),
));
?>
</div>
also "CButtonColumn.update" an delete not defined
You have an extra space in the attribute name. 'summaryText ’ should be ‘summaryText’.
Your button configuration should go into either the buttons property or in the updateButton* and deleteButton* properties.
thanks, but why
array(
'class' => 'CButtonColumn',
'template' => '{update}{delete}',
'delete' => array(
'url' => 'Yii::app()->createUrl("utilizadores/delete", array("id"=>$data->id_utilizador))',
'imageUrl' => '/images/delete.png'
),
'update' => array(
'url' => 'Yii::app()->createUrl("utilizadores/update", array("id"=>$data->id_utilizador))',
'submit' => 'post',
'imageUrl' => '/images/page_white_edit.png'
),
),
),
say "CButtonColumn.delete" is not defined?
See my edited answer above
sorry forget ‘buttons’ => array(
By the way ,elegant way to remove all styles from cgridview?
You can set the cssFile property to false.
use ‘template’ => ‘{items}{summary}{pager}’,
u can on/off its value and change its order In Gridview
http://www.yiiframework.com/doc/api/1.1/CBaseListView#template-detail