Cgridview Button Ajax Update Not Working

i got the following gridview:

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









                        'disconnect' => array(



                            'label'=>'Disconnect from configuration',

                            'options' => array(

                                'ajax' => array(

                                    'type' => 'get',


                                    'success' => 'js:function(data) { $.fn.yiiGridView.update("devices-grid")}'








The device gets disconnect just fine, but on the moment the gridview starts updating it just disappears.

When i manually refresh the page i get the updated gridview.

Anyone got an idea what i did wrong?

Never mind, had an old peice of code in my action that prevented the rendering of the gridview during a ajax call.