[英]Restrict page to load while pagination using ajax in yii through CGridView
I have been stuck for few days on ajax pagination.. 我已经在Ajax分页上停留了几天。
in my controller
, I have 在我的
controller
,我有
$dataProviderRegSum = new CSqlDataProvider($rawData, array(
'keyField' => 'FamilyId',
'totalItemCount' => $count,
'pagination'=>array('pageSize'=>20)
));
here $rawdata is the result of query... 这里$ rawdata是查询的结果...
and in my view
,I have 在我
view
,我有
$this->widget('zii.widgets.grid.CGridView', array(
'id'=>'family-record-grid',
'dataProvider'=>$dataProviderRegSum,
'enableSorting' => true,
//'cssFile' => $cssfile,
'itemsCssClass'=>'tabchin',
'columns'=>()
)
);
this is my grid view ,where I wanna display data with pagination
.. 这是我的网格视图,我想在其中显示
pagination
数据。
my problem is that,while pagination ,total page is loading ... 我的问题是,在分页时,整个页面正在加载...
but i want pagination with ajax in yii
,without loading fullpage.. 但我想用AJAX分页
yii
,没有装全页..
how to achieve it,please anybody help.....thanks for reading my question.... 如何实现它,请任何人帮助.....感谢阅读我的问题...。
Please try this, 请尝试一下
$this->widget('zii.widgets.grid.CGridView', array(
'id'=>'family-record-grid',
'dataProvider'=>$dataProviderRegSum,
'enableSorting' => true,
//'cssFile' => $cssfile,
'ajaxUpdate' => true,
'itemsCssClass'=>'tabchin',
'columns'=>()
));
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.