i got the following gridview:
$this->widget('zii.widgets.grid.CGridView', array(
'id'=>'devices-grid',
'dataProvider'=>$defaultParameters->ConnectedDevices,
'columns'=>array(
'DeviceID',
array(
'class'=>'CButtonColumn',
'template'=>'{disconnect}',
'buttons'=>array(
'disconnect' => array(
'url'=>'YII::app()->createUrl("Device/Disconnect",array("id"=>$data->DeviceID))',
'imageUrl'=>Yii::app()->getBaseUrl().'/images/disconnect.png',
'label'=>'Disconnect from configuration',
'options' => array(
'ajax' => array(
'type' => 'get',
'url'=>'js:$(this).attr("href")',
'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?