I everyone i have a cgridview and the data provider is from a diferent model so i have changed the button options , and all worked fine.One problem: When i press the delete option the row is eliminated but the cgridview desapear.
here my delete button
here is the delete control function
what i should do on the controller function ? Maybe redirect back to the view ? Help please
here my delete button
array
(
'class'=>'CButtonColumn',
'template'=>'{view}{update}{delete}',
'buttons'=>array(
'delete' => array
(
'url'=>'Yii::app()->createUrl("linha_notificacao/delete", array("id"=>$data->n_linha_notificacao))',
'options'=>array('title'=>'Apagar...')
),
),
),
),
here is the delete control function
public function actionDelete($id)
{
$this->loadModel($id)->delete();
// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser
if(!isset($_GET['ajax']))
$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));
}
what i should do on the controller function ? Maybe redirect back to the view ? Help please