Making CGridView Display Different Values From Different Models
Rate Topic:

I have a model of a particular table which is running fine and works great with CGridView. The main issue I have is that I need to display information from other models based on values from the main model.

For example, lets say I have a "main model" called "Customers." They have some kind of field that indicates a kind of ice cream they got with a number. So, in the model -

In this case, CGridView is using "Customer" as its main model as that's where most of the data comes from. My question is, how do I tell CGridView to use Customer::iceCreamType in the data set from the IceCream model to obtain its output value? I guess I'm looking for something like this:

I think, though, it might be a fixed number of "types" of "ice cream" in my actual case (the Ice Cream analogy is a little flawed in this way) but that doesn't make it anymore logical really... especially when you're trying to do things in a clean fashion.

Thanks for the link! The relations never really made much sense to me from working through the blog tutorial or reading things in the API but this looks like it'll clear stuff up. Awesome.