CGridView with Array as a Model

Is any way to create CGridView displayed content of array with a filter?

I have a csv file i need to display with sort and filter ability, so i write smth like:


public function actionIndex() {

        $items = $this->parse();


        $dataProvider = new CArrayDataProvider($items,

                        array('keyField' => 'ID',

                            'pagination' => array('pageSize' => 20,),

                            'sort' => array('attributes' => array(






        $sort = new CSort($modelClass);

    $this->render('index', array('model' => $model, 'dataProvider' => $dataProvider));



    private function parse() {

        $items = array();

       // here file content is parsed into array 

        return $items;


And View

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

    'dataProvider' => $dataProvider,


    'columns' => array(







Can somebody help me to create filter?

Help me!