Error Deleting on CGridView

Hi!, I’m working on a GridView but I have a problem when I try to delete a record from delete botton in the grid, only happens on IE, on firefox and chrome works fine!.

I think the problem is when the jquery tries to update the table after deleting the record, because delete the record but sometimes it didn´t update the table correctly or update it with other records that didn´t exist on the database and it was deleted before. I think that could be some cache error but I didn’t know where find it and what to modify to fix it.

The controller and model doesn’t have something diferent form the base code generated for gii.

I added some screenshots from my app.

I would appreciate every help you could give me.

Before Delete:



After Delete:



if I updated with F5:



I think it could be of great help if you could also show the delete action of your Controller and Model delete function

sorry, I forgot that little detail jeje!..

This is the code of my view:

<?php $this->widget('zii.widgets.grid.CGridView', array(





                'header' => false,


                'nextPageLabel' => '>',

                'prevPageLabel' => '<',

                'firstPageLabel' => '<<',

                'lastPageLabel' => '>>',),







)); ?>

and this is the delete action in my controller

public function actionDelete($id)






	      $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));



         throw new CHttpException(400,Yii::app()->params['msg400']);


this happens only after the second time that I had tried to delete some record :S

I was testing yesterday and this happen on every gridview I have, and when i´m deleting from the gridview, if someone could help me I would really appreciate it. please!

This "problem" is very strange… the code you posted is OK… should be something else…

To be sure it’s something in your application… I would suggest you to create a new Yii webapp… and in that one create the CRUD for any table… then check if here is all working…

Wow, strange thing… If IE is actually redirecting to a ‘cached’ source page… Can you try the following: on the actionDelete, can you include a new parameter to the redirect function that adds a time() value to the end of the URI string? I am curious about its result