You almost got it right. Just that you will need more button columns, use a proper template
for each column, and specify buttons
for each column correctly:
'columns'=>array(
'customer_name',
array(
'header'=>'Header 1.1', // add headers this way
'class'=>'CButtonColumn',
'template'=>'{select1}', // only 1 button
'buttons'=>array
(
'select1' => array
(
// ... options for select1 button
),
),
),
array(
'header'=>'Header 1.2', // add headers this way
'class'=>'CButtonColumn',
'template'=>'{select2}', // only 1 button
'buttons'=>array
(
'select2' => array
(
// ... options for select2 button
),
),
),
// ... and so on add the other button columns ...
// ... rest of columns ...
),
Incase you wanted all buttons in 1 column, you just have to add the button options within the buttons
property:
'columns'=>array(
'customer_name',
array(
'class'=>'CButtonColumn',
'template'=>'{select1}{select2}{select3}', // only 1 button
'buttons'=>array
(
'select1' => array
(
// ... options for select1 button
),
'select2' => array
(
// ... options for select2 button
),
'select3' => array
(
// ... options for select3 button
),
// ... and so on add the other button options ...
),
),
// ... rest of columns ...
),
Update: Just remember that whatever buttonId you mention in the template
, use that buttonId to specify the button options:
'class'=>'CButtonColumn',
'template'=>'{buttonId1}{buttonId2}',
'buttons'=> array(
'buttonId1'=>array(
// ... options ...
),
'buttonId2'=>array(
// ... options ...
)
)