I have a cgridview and when i click in the delete icon the grid disapear but the delete works . Any suggestions ?
I have a cgridview and when i click in the delete icon the grid disapear but the delete works . Any suggestions ?
Any code can provide?
If you are using gii created code, then it should like
/**
* Deletes a particular model.
* If deletion is successful, the browser will be redirected to the 'admin' page.
* @param integer $id the ID of the model to be deleted
*/
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'));
}
Please note, the delete action in admin page is called AJAX, so if you did not enabled AJAX, the redirect code may not work, and will return blank page.