Link on grid to execute PHP using AJAX event

What i would like to do is have a button or image on a grid that the user clicks on and some custom PHP is executed and the grid gets refreshed.

What is the best way to acheive this ??

I have tried adding a custom filed to the grid, setting it to html image and the adding an OnClick() ajax event, but this does not work as I have not defined the image as a hyperlink or created a link ( because i dont want to open another application )

Can anyone point me in the right direction ? Is this even possible.

Cheers