[Solved] problem with multiple pagination in the same page

Hi,

I have in the same page two tables, each one has his own pagination bar, when I navigate in one of them, the other is updated simultaneously  :(

How can I navigate in each one independantly?

and here is the source code :



...


<br>


<?php $this->widget('CLinkPager',array('pages'=>$first_pages)); ?>


<br>


<table class="dataGrid">


    <tr>


        <th><?php echo 'column11'; ?></th>


        <th><?php echo 'column12'; ?></th>


        <th><?php echo 'column13'; ?></th>


    </tr>                         


    <?php foreach($first_data_chunk as $n=>$row): ?>


    <tr class="<?php echo $n%2?'even':'odd';?>">


        <td><?php echo CHtml::encode($row->column11); ?></td>


        <td><?php echo CHtml::encode($row->column12); ?></td>


        <td><?php echo CHtml::encode($row->column13); ?></td>


    </tr>


    <?php endforeach; ?>


</table>   


<br>


<br>


<?php $this->widget('CLinkPager',array('pages'=>$second_pages)); ?>


<br>


<table class="dataGrid">


    <tr>


        <th><?php echo 'column21'; ?></th>


        <th><?php echo 'column22'; ?></th>


        <th><?php echo 'column23'; ?></th>


    </tr>                         


    <?php foreach($second_data_chunk as $n=>$row): ?>


    <tr class="<?php echo $n%2?'even':'odd';?>">


        <td><?php echo CHtml::encode($row->column21); ?></td>


        <td><?php echo CHtml::encode($row->column22); ?></td>


        <td><?php echo CHtml::encode($row->column23); ?></td>


    </tr>


    <?php endforeach; ?>


</table>   


<br>


...


     

 

Thanks for your help,

Balha,

When you create CPagination instance, specify its 'pageVar' so that it can be diffierentiated for different pagers.

Thanks qiang,  ;)

I changed the 'pageVar' for each CPagination instance, and it worked like a charm.