Change keyfield from model in CGridView

I have a table with

  • id

  • id_user

  • id_company

if i feed this table model to a CGridView is it possible to use the id_user as the key field (the one that shows in the span fields next to <div class="keys" style="display:none" ?

You can probably use the keyAttribute property of CActiveDataProvider.

/Tommy