Hi, Gurus, I am newbie to YII and want to display tow header rows in cGridView but i don’t find anything related to that.
It must show main heading
Consider the following as a grid:
Options Orientation having colspan 2 Type
Edit GridView LinearView isBoth
Edit yes No No
Edit No No No
Edit Yes Yes Yes
The above two are header rows and the below ones are data row which contain yes, no etc.
In this way i want to display CGridView on my page, i have tried to pass two rows but all in vain, i have also tried this:
$aryColumns = array(
array( 'header'=>'M', 'name'=>'', ), array( 'header'=>'New</tr><tr>', 'name'=>'', 'headerHtmlOptions'=>array('colspan'=>'2'), ), array( 'header'=>'Name', 'name'=>'name', ), array( 'header'=>'Age', 'name'=>'age', ), array( 'header'=>'BN', 'name'=>'name', ), );
It generates two header rows but also generate two extra columns in tbody which is coming as there are 5 columns, two in above row and three in second, while it must only consider three columns while rendering tbody with data.
Please guide me in this regard.