I went through many topics and tried different codes, but not working…
I need "delete" button in my gridview.
On delete I need to delete file from folder (I need to call controller/action -> test/delete through ajax with parameter $data).
When success, it should update my gridview (if success it should call js code: ‘js:function(){$(\’#image-grid-view\’).yiiGridView.update(\‘image-grid-view\’);}
array(
'class' => 'MyButtonColumn',
'buttons' => array(
'view' => array('visible' => 'false'),
),
//'viewButtonUrl'=>
//'updateButtonUrl'=>
'deleteButtonUrl'=>'Yii::app()->createUrl("/test/delete", array("id" => $data))', //THIS IS NOT CORRENT, NEED AJAX CALL
),
test/delete will take parameter $data that contains filename and delete given file from folder on server with given name.