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

http://www.yiiframework.com/forum/index.php?/topic/9714-sort-user-defined-column-in-cgridview/

http://www.yiiframework.com/forum/index.php?/topic/7420-undestanding-relational-queries-with-cactivedataprovider/