Process advanced search results


I followed a tutorial to enable the Advanced search in the index file of a table like this:


/* @var $this TakeController */

/* @var $dataProvider CActiveDataProvider */





	array('label'=>'Create Take', 'url'=>array('create')),	

	array('label'=>'Manage Take', 'url'=>array('admin')),


Yii::app()->clientScript->registerScript('search', "



    return false;


$('.search-form form').submit(function(){

    $.fn.yiiListView.update('takelistview', {        

        data: $(this).serialize()


    return false;





<?php echo CHtml::link('Advanced Search','#',array('class'=>'search-button')); ?>

<div class="search-form" style="display:none">

<?php  $this->renderPartial('_search',array(


)); ?>


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




	'sortableAttributes'=>array('id', 'data'')

)); ?>

I would like to know if there is a way to process the output of the advanced search. I know that with $dataprovider I can access all the records for this table, but I want to access only the filtered ones. In particular, I want to get the attribute “data” for each record in order to enable the download for all filtered records. I took a look at $.fn.yiiListView and CListView but I don’t understand what to do. Can you help me? Thanks!


For your information

  1. After you click advanced search submit button. you will get filtered data in dataprovider.

  2. Dataprovider data is passed into _view.

  3. In _view you can process all the data ,because you are getting all data in the view.