I am using pagination to view table rows. I want to select different rows from different pages and then submit the form.
But when I select different rows from a page and move to another page to select more then back to previous page again, I didn’t find already checked row there.
Here is my code-
<table class="table">
<tr>
<th></th>
<th>Name</th>
</tr>
<?php
$j=0;
foreach($datavalue as $datainarray)
{
?>
<tr>
<td>
<input type="checkbox" id="item_id[<?php echo $j; ?>]" name="item_id[<?php echo $j; ?>]" value="<?php echo $datainarray->attributes['item_id']; ?>">
</td>
<td>
<?php echo $datainarray->attributes['Name'];?></td>
</tr>
<?php
$j++;
}
?>
</table>
<?php
$this->widget('CLinkPager',
array( 'itemCount'=>$row_count,
'pageSize'=>20,
'maxButtonCount'=> 10,
'nextPageLabel'=>'Next >>',
'header' => '', ));
?>
I have searched web to find a solution but I didn’t find a suitable solution.
Hoping to find suitable solution from experts.
Thanks