Dear all,
I am using CarrayDataProvider and CListView to display datas now. But I found the ajax pagination is not working when I add
'keyField'=>'questions_id',
.
Here is one of my dataproviders …I have same codes for another data provider, this one is only different with
'keyField'=>'questions_id',
.
And AJAX is not woking anymore… Thanks so much!
in my View:
$this->widget('zii.widgets.CListView', array(
'dataProvider'=>$questionsDataProvider,
'itemView'=>'_questionsview',
'pagerCssClass'=>'right',
'template'=>'{items}{pager}',
'ajaxUpdate'=>true,
));
In my Controller:
$questions=QuestionsEmail::model()->findAllByAttributes(array('user_id'=>$user->id));
$questionsDataProvider=new CArrayDataProvider($questions,array(
'pagination'=>array(
'pageSize'=>5,
),
'keyField'=>'questions_id',
));
Everything should be fine…but AJAX is not working… No ajax request submitted…when you click on the pager, a new url address will be generated…
No errors in firebugs…also
Thanks!!!