hi i have problems regarding with pagination.
here is my code
for controller
$dataProvider = new CActiveDataProvider('User', array(
'pagination'=>array(
'pageSize'=>10,
),
));
$this->render('users',array(
'dataProvider'=>$dataProvider,
));
for view users
$this->widget('zii.widgets.CListView', array(
'dataProvider'=>$dataProvider,
'itemView'=>'_user',
);
and for _user
<?php $viewid = $data->iduser; ?>
<tr id="tr<?php echo $viewid; ?>">
<td><?php echo CHtml::encode($data->idstatus0->type); ?></td>
<td><?php echo CHtml::encode($data->iduser_type0->type); ?></td>
<td><?php echo CHtml::encode($this->displayDate($data->date_added)); ?></td>
<td><?php echo CHtml::encode($this->displayDate($data->date_lastlogin)); ?></td>
<td><?php echo CHtml::ajaxLink($text, $this->createUrl('admin/deleteuser',array('id'=>$data->iduser)), array('success'=>"js:function(html){ $('#tr{$viewid}').remove(); }"), array('confirm'=>_t('Are you sure you want to delete this user?'), 'class'=>'delete-icon','id'=>'x'.$viewid)); ?></td>
</tr>
if i have 15 rows in a database it will only show 10 and will generate a pagination for next 5. The first 10 rows has no problem with the ajaxLink because the clientscript was generated but problem is the when I move to the next page, the ajaxLink is not working because its not generated by the pagination .
any idea? thanks