CGridViewウィジェットにはすでにview、update、deteオプションがありますが、jquery mobileベースのプロジェクトでCListViewウィジェットを使用していますが、削除オプションのajaxリンクの作成に問題があります。_view.php(ビューファイル)とそのrenderPartial()ビューファイルにajax削除リンクを作成して、plzヘルプが正常に削除された後にバーを非表示にする方法がわからない場合は、事前に感謝します。編集と削除のための_view.phpファイルのリンクは次のとおりです。
<?php
echo CHtml::link(CHtml::encode($data->id),
array('editmember1', 'id' => $data->id),
array('data-role' => 'button', 'data-icon' => 'star')
);
echo CHtml::link(CHtml::encode($data->id), $this->createUrl('customer/delete', array('id' => $data->id)),
array(
// for htmlOptions
'onclick' => ' {' . CHtml::ajax(array(
'beforeSend' => 'js:function(){if(confirm("Are you sure you want to delete?"))return true;else return false;}',
'success' => "js:function(html){ alert('removed'); }")) .
'return false;}', // returning false prevents the default navigation to another url on a new page
'class' => 'delete-icon',
'id' => 'x' . $data->id)
);
?>