Hi
I have a CGridView as below :
<?php
$this->widget('zii.widgets.grid.CGridView', array(
'id'=>'mail-grid',
'dataProvider' => $model->search(),
'filter' => $model,
'pager'=>array(
'header'=>'',
'pageSize' => 1,
'firstPageLabel'=>'<<',
'prevPageLabel'=>'<',
'nextPageLabel'=>'>',
'lastPageLabel'=>'>>',
),
'columns' => array(
'id',
array('class' => 'CCheckBoxColumn','id' => 'check-boxes' ,'selectableRows' => '2','header'=>'Selected',),
array('name'=>'mail_subject', 'value' => '$data->mail_subject'),
array('name'=>'from_name', 'value' => '$data->from_name'),
array('name'=>'to_user_email', 'value' => '$data->to_user_email'),
,),)); ?>
the problem that when i try to search a record with an id it’s giving any result(using the filter).
the second problem is that the “page numbers” below the record seems without any ‘href’ an empty link when i click in page ‘2’ for example nothing happen i used firebug and i found that there is a request with this parameter :
ajax mail-grid
this is the search method in the model
public function search()
{
$criteria=new CDbCriteria;
$criteria->compare('id',$this->id);
$criteria->compare('to_user_email',$this->to_user_email,true);
$criteria->compare('from_email',$this->from_email,true);
.
.
.
.
return new CActiveDataProvider($this, array(
'criteria'=>$criteria,
'pagination' => array('pageSize'=>10),
));
}