CGridView - ajaxUpdate set to false - deleteButton problem

Even when I set ajaxUpdate=>false in the CGridView, CGridView still generates click event listener for delete button as follows:


jQuery('#yw0 a.delete').live('click',function() {

	if(!confirm('Are you sure to delete this item?')) return false;

	$.fn.yiiGridView.update('yw0', {

		type:'POST',

		url:$(this).attr('href'),

		success:function() {

			$.fn.yiiGridView.update('yw0');

		}

	});

	return false;

});

It seems uncorrect to me. How to get rid of it?

That is the correct behavior (see ajaxUpdate), it only applies to paging and sorting. To change it you need to override the delete button and provide your own url (see CButtonColumn template, bottom of page shows examples)

Thank you for your answer! Actually, I was aware that I can configure my own delete button. I was just wondering why CGridView is designed so that ajaxUpdate=>false applies to sorting and pagination only and not to deleteButton. But sure, this is not a big problem.