[Ask] Crosstab Cgridview

i have a question,

how to make a view like this,

3703

grid2.png

from my CGridView,

3704

grid1.png

this is my code :




<?php 

$sum=Yii::app()->db->createCommand('SELECT SUM(penyusutan) FROM view_penyusutan_gol_per_tahun')->queryScalar();


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

	'id'=>'twilayah-grid',

	'dataProvider'=>$model->search(),

	//'summaryText'=>'Jumlah Total : '. $sum,

	'filter'=>$model,

	'columns'=>array(

		'thn_ang',

		'kd_gol',

		'ur_gol',

		//'total',

		//'footer'=>'Total: '.number_format($sum), 

		array(

			'name'=>'penyusutan',

			'value'=>'number_format($data->penyusutan,0,"",".")',

			'htmlOptions'=>array('style'=>'text-align:right;'),

			'footer'=>number_format($sum,0,"","."), 

			'footerHtmlOptions'=>array('style'=>'text-align:right;'),

			'headerHtmlOptions'=>array('style'=>'text-align:right;'),

		),

		/*array(

			'class'=>'CButtonColumn',

		),*/

	),

)); 

?>



thanks. . .

This thread is about your problem I think

Thanks to kokomo, but i didnt find an answer. .

is there anything else kokomo??

how to help you? some columns in yr first table can’t be seen in the second

the corresponding amounts from year 2006 to 2011

@fouss

yees, the year from 2006 to 2011,

i dont crop all of my grid, only in the first page. .