Hi!
I’m having a bit of trouble filtering a table column on a related table, where the table structure is such that:
Grid displays:
-
Book Id
-
Book Name
-
Book Author Name/s
Where Books can have multiple authors and a related by an intermediary table of structure:
book_authors
BOOK_ID
AUTHOR_ID
While I can successfully get a filter at the top of the grid column filled with author names:
'columns' => array(
...,
...,
...,
array(
'name' => 'assignedAuthor',
'value' => '$data->RelatedAuthor',
'type' => 'html',
'htmlOptions'=>array('width'=>'15%'),
'filter'=>GxHtml::listDataEx(Author::model()->findAllAttributes(null, true,' AUTHOR_ID IN (SELECT DISTINCT AUTHOR_ID FROM book_authors) ')),
),
...,
The filter won’t actually work…
I think possibly I’m a bit confused by the findAllAttributes option…
Can anyone please point me in the right direction?
Thanks!!