i have three models A,B,C. A belongs to B,B belongs to C.How to get C’s attribute in A’s gridview?
i have three models A,B,C. A belongs to B,B belongs to C.How to get C’s attribute in A’s gridview?
in the item list:
array(
'label'=>'Attribute of C',
'value'=>'$item->B0->C0->attributeName'
)
This works if you have the relation B0 in A and C0 in B that returns the B and C models respectively.
thx,it works and i want to know how to set filters,i means how to modify the search() function