Hi,
Could anyone tell me how to put a filter on an attribute coming from a related in a CGridView? Below is the admin.php view file. My product table is related to shop table by the foreign key shopId. The page rendered is ok except that I cannot filter on the column shop.name. Thanks beforehand.
<?php $this->widget(‘zii.widgets.grid.CGridView’, array(
'id'=>'product-grid',
'dataProvider'=>$model->search(),
'filter'=>$model,
'columns'=>array(
'id',
'shopId',
'shop.name',
array(
'class'=>'CButtonColumn',
),
),
)); ?>