CButtonColumn Ajax Post button?
Rate Topic:

Hi All,
I need to add a button to my CButtonColumn that calls an action in my controller via AJAX/POST.
This button will simply change a field in a table from unpaid to paid.
I have the following in my view right now.

But i want to have any editing request done via POST and not GET.
I've looked over the forum and Google and haven't been able to find any clear examples documented.
Any thoughts would be appreciated.
Thanks in advanced!!

The only bit i'm trying to figure out now is how to refresh/redirect after the ajax request.
I tried both the redirect and refresh methods in my pay action but nothing happened. Does this need to be done via JS ?

The only bit i'm trying to figure out now is how to refresh/redirect after the ajax request.
I tried both the redirect and refresh methods in my pay action but nothing happened. Does this need to be done via JS ?

Thanks
Oliver

refresh:

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

// do after the ajax success , you see i give you "alert(res);" originally

/* use document.reload(true); or location.href = location.href; to refresh current whole page, above is ajax update only refresh partial of page.*/