Cgridview Search Filter From Array Data Provider

Hello,

I’m pretty new to Yii ( and frameworks all together ) and I’m trying to show the search results, that are contained inside an array, with GridView like this:


<?php

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

    'id' => $model['res_id']

    , 'dataProvider' => new CArrayDataProvider( $model['company'] )

    , 'ajaxUpdate' => true

    , 'itemsCssClass' => 'table table-bordered table-striped table-hover cni_custom'

    , 'pagerCssClass' => 'cni_pagination'

    , 'pager' => array(

            'htmlOptions' => array( 'class' => 'pagination' )

            , 'header' => ''

        )

));

?>

The results are show just fine, but I’m struggling how to add the Search filter to this table.

All I could find is to add $model->search to it, but, since my data provider is generated from array, I can’t use that.

Any suggestions how to do this? Do I need to create additional class, that will define this? A link to the correct manual will also help.

Thank you all in advance.

Found the solution. If anyone else has the same problem, this topic will help a lot!