How To Modify Where User Is Redirected After Item Is Deleted

Every time I delete a record, I’m being redirected to the following url:


how do I change it to be:



The following is my delete button code:

    $this->widget('bootstrap.widgets.TbButton', array(






            'confirm'=>'are you sure?',

            'submit'=>array('delete', 'id'=>$model->crew_code),




returnUrl isn’t seem to be doing the trick.

The redirection is handled in your delete action, so you should start there. Post the code here if you can.

How the hell did I miss that!? :blink:

Thanks for pointing where to look, it’s good now.

It’s in the Controller actionDelete… i think!