CGridView problem

I am using the CGridView to view the cats table and I have an array $acts(1=>‘active’,0=>‘unactive’).

So I set this but it does not work, what is wrong? (cat_active has values 1,0 )

$this->widget('zii.widgets.grid.CGridView', array(











try this:


[not tested]

Now nothing is shown at this attr , I thing because I use an array.

When I set $acts[1] I see the ‘active’ , something is wrong with $data->cat_active

I solved similar problem with a function…

before calling CGridView make a function like:

function getStatus($id)



   return $acts[$id];


then in the call to CGridView use:





Very strange but it works.