Related Search Behavior

Sorry I don’t understand the first point, what do you mean?

For instance, I can write for the columns of the CGridView:


        'columns'=>array(

                'device_id',

                array(

                        'name'=>'device_type_id',

                        'value'=>'$data->device_type_description',

                        ),



So ‘value’ is a PHP expression executed for each row.

You can do:


        'columns'=>array(

                'device_id',

                array(

                        'name'=>'device_type_id',

                        'value'=>'implode(" - ",$data->descriptions)',

                        ),



I used a simple implode, you may need an array_map with an anonymous function, or you may just create a virtual field in your model doing the work.

I have released a new version of the extension.

The problem was that I was accessing again the data in the wrong way, not using the relation name.

At the end I solved as you suggested, with




array(

            'name' => 'gruppo_accesso',

            'value' => 'implode(", ",$data->aeGOfferteGruppiAccessos)'

        ),



Thank you very much for your extension and your very fast assistance! :)