CGridView filter with relations

Hi

Check out my RelatedSearchBehaviour Extension. It will make this stuff easier to do.

My Code:




array('name'=>'region_id', 'header'=>'Region', 'value'=>'Region::model()->FindByPk($data->region_id)->region_name'),



Thank you Orteko, :rolleyes:

I was following this wiki article, and for me it was absolutely not working. And finally I could solve this based on Hollyii’s Yii Blog article.

BR

c

Hi all,

How about this wiki ?

http://www.yiiframework.com/wiki/281/searching-and-sorting-by-related-model-in-cgridview/

It works.