Question

I use CButtonColumn look like this:

 <?php $this->widget('zii.widgets.grid.CGridView', array(
             'id'=>'user-grid',
             'dataProvider'=>$model->search(),
             'filter'=>$model,
             'pager' => array(
                 'firstPageLabel' => '&lt;&lt;', 
                 ),
             'columns'=>array(
                 'username',
                 'name',
                 'email',
                 'creationDate',
                 array(
                         'class' => 'CButtonColumn',
                         'template' => '{change} {view}',
                         'button' => array(
                            'change' => array(
                                'url' => 'aaaaaaaa',
                            ),
                     ),
                 )
             ),
         )); ?>

And i got an error:

Use of undefined constant aaaaaaaa - assumed 'aaaaaaaa'

How I can cusomize CButtonColumn rightly?

Was it helpful?

Solution

Try

'url' => '"aaaaaaaa"'

instead

OTHER TIPS

'url'=>'Yii::app()->createUrl("your_controller/action")',
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top