Update database using TbEditableColumn YiiBooster

153 views Asked by At

I'm working with Yii and YiiBooster, I'm using TbEditableColumn to edit my GridView.

Is it possible to change data in my table using this editable column?

This is my code:

$this->widget('booster.widgets.TbGridView', array(
'id' => 'post-grid',
'type' => 'striped bordered',
'dataProvider' => $model->search(),
'filter' => $model,
'columns' => array(
    array('name' => 'author_name', 'value' => '$data->author ? $data->author->username: "-"'),
    array('name' => 'kegiatan', 'value' => 'str_replace(array("\r\n", "\r", "\n"), "\n", $data->kegiatan)'),
    'pic',
    'keterangan',
    'create_time',
    array(
            'class' => 'booster.widgets.TbEditableColumn',
            'name' => 'feedback',
            'sortable' => false,
            'editable' => array(
                'url' => $this->createUrl('updateFeedback'),
                'placement' => 'right',
                'inputclass' => 'span3'
            )
        ),
    array(
        'header' =>'Action',
        'class' => 'CButtonColumn',
    ),
),
));

What must I do in MyController/updateFeedback?

0

There are 0 answers