Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

How To Display An Array Of Data From A Related Table In Cgridview

$
0
0
I have a model of person and group_membership

Person
(id
,name
...
);

Group
(id
,name
...
);

Group_Membership
(id
,person_id
,group_id
);

If I want to allow a user to see the groups in the CGridView of the Admin page (or page like admin) for Person
any suggestions on how to accomplish this?

Example

ID, Person, Groups
1, Bob Miller, (A, B, C, F)
2, Mike Smith, (C, D, F)
...

is there a widget that can be included in a CGridView column that would go out and query the list of groups for the Person?

Another concern I have is how do I allow the user to search for Persons in Group "C and D"?

Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>