S0RIEN/DataGridBundle — Issue #89: Add a joined column 
Author: morferic
Created: 2012-02-28 16:22:53+00:00
State: open

I have this situation:

a table "Tour" joined with a table "Clients" and a table "Cities" joined with "Clients" table.
I must represent the Tour grid, with the last name of clients in a column and the client's city in another.
For the last name no problem (as described in the last section of the "Annotations" section of docs), but what can i do for the client's city?
I have tried with the annotation:

* @GRID\Source(columns="id, client, client.city", defaultOrder="cliente")

in the Tour entity, but does not work!
I must Add a new column in the controller?
I have tried with:

$MyColumn = new Column(array('id' => 'city', 'title'=>'My Column', 'size' => '54', 'sortable' => true, 'filterable' => false, 'source' => false));
$grid->addColumn($MyColumn);

but does not work and I'm not sure that is the best solution!
Thanks!