Search using zii widget

Hello guys. I am using zii.widgets.grid.CGridView for search purpose. Which Gii crud creates automatically. see the below auto generated code


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

    'id' => 'projects-grid',

    'dataProvider' => $model->search(),

    'filter' => $model,

    'columns' => array(







            'class' => 'CButtonColumn',





No if we want to remove filtering/searching form here we just remove filter option. But question is, is there any possibility that we can separate our filter/search property from listing and place it anywhere else at same page.

like at many forms in left column we have a quick search box and in right column we have a listing view. user type in text box in left, and searched material is displayed in right grid…

any idea how we can separate filter option??

You can use Advanced Search generated by Gii, and move it’s code to anywhere you wish. Or make you own search form and pass data from search()->criteria. Take a look this.

Thanx dude… it workd, when we disable ajaxupdate… :) right now i don’t need ajax call…

Thanx again.

One more thing. how can we increase number of records per page… in CGridView

Take a look at this post:

glad you’ve solved your problem.