Dear Friend
By looking at the following code, one can conclude that you have not still declared that property columns.
<?php $this->widget('zii.widgets.grid.CGridView', array(
'dataProvider'=> new CArrayDataProvider($data->medias, array(
'id'=>'album',
'sort'=>array(
'attributes'=>array(
'id', 'title',
),
),
'pagination'=>array(
'pageSize'=>2,
))),
)); ?>
The following is to just simulate your scenario.
I have a Model Author.
I have a Model Book.
They have MANY_MANY relation.
views/author/index.php
<?php $this->widget('zii.widgets.CListView', array(
'dataProvider'=>$dataProvider,
'itemView'=>'_view',
)); ?>
views/author/_view.php
<div class="view">
<b><?php echo CHtml::encode($data->getAttributeLabel('id')); ?>:</b>
<?php echo CHtml::link(CHtml::encode($data->id), array('view', 'id'=>$data->id)); ?>
<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('name')); ?>:</b>
<?php echo CHtml::encode($data->name); ?>
<br />
</div>
<?php $this->widget('zii.widgets.grid.CGridView', array(
'id'=>$data->id,
'dataProvider'=>new CArrayDataProvider($data->books,array(
'sort'=>array('attributes'=>array('id','name'))
)),
//'filter'=>$model,
'columns'=>array(
'id',
'name',
array(
'class'=>'CButtonColumn',
),
),
)); ?>
Now every list item is containing author name followed by a grid containing books wriiten by him.
If I comment out the columns section in the following way, I am getting the same problem you are facing.
<?php $this->widget('zii.widgets.grid.CGridView', array(
'id'=>$data->id,
'dataProvider'=>new CArrayDataProvider($data->books,array(
'sort'=>array('attributes'=>array('id','name'))
)),
//'filter'=>$model,
/*'columns'=>array(
'id',
'name',
array(
'class'=>'CButtonColumn',
),
),*/
)); ?>
Regards.