CGridView value

How do I assign in an CGridView a field with an id associated with the related name??

For example i have a CGridView in which i display Dipartimento e facoltà but i take this value from another model,so i display the id associated but i want to see the name of the Dipartimento or Facoltà

Can i insert in the CGridView of the admin an attribute??

look this, maybe help you