Filter Of Cgridview

Hi everyone !

I am starting to learn Yii, just a quick question.

What’s the use of filter in CGridView? What happens when we are passing the model in the filter?

Please help me understand. Thank you

Hi Daskul, welcome to the forum.

Just input some word in the filter and hit return key, then CGridView will update its content filtering by the word you have input.

It’s a kind of search form with input fields … CGridView needs a model instance to create those input fields, just as you need a model when you create a CActiveForm.

This wiki article will help you understand the basics of CGridView.

http://www.yiiframework.com/wiki/381/cgridview-clistview-and-cactivedataprovider/

Thank you for your quick response sir.

Wow this community is great :)