Select all CListView

Hello, I have CListView output.

index.php




$this->widget('zii.widgets.CListView', array(

	'dataProvider'=>$dataProvider,

	'itemView'=>'_view',

));

echo CHtml::button('Delete');


?>



_view.php


<div class="view">


    <b><?php echo CHtml::encode($data->getAttributeLabel('id')); ?>:</b>

    <?php echo CHtml::link(CHtml::encode($data->id), array('view', 'id' => $data->id)); ?>

    <br />




    <b><?php echo CHtml::encode($data->getAttributeLabel('useridfrom')); ?>:</b>

       <?php echo CHtml::encode($data->useridfrom); ?>

    ?>

  

    <b><?php echo CHtml::encode($data->getAttributeLabel('theme')); ?>:</b>

       <?php echo CHtml::encode($data->theme); ?>

    <br />


    <b><?php echo CHtml::encode($data->getAttributeLabel('content')); ?>:</b>

        <?php echo CHtml::encode($data->content); ?>

    <br />

 

    echo CHtml::checkBox('chec');


</div>

I need when I click Delete button from index.php, to delete all selected items from listview.

How can I take all checked items (with checkbox ‘chec’) and send them with $data->id to some controller/action by clicking delete button?

Image how it looks like

That would be tabular input, check this link

Thank you! I did this way.