ajax refresh in custom cbuttoncolumn


I am trying to make a new button for a cgridview, that functions like the delete button (I’m using logical delete).

So far I have a button which calls the action fine and updates the row, but I can’t get it to update the gridview…

  	   $buttonArray = array(








					'options'=>array(  // this is the 'html' array but we specify the 'ajax' element



			           'url'=>"js:$(this).attr('href')", // ajax post will use 'url' specified above








the ‘click’ function doesn’t call either. What am I missing here??


IIRC, there’s no ‘ajax’ available in the CButtonColumn property buttons.

You can use the click handler to call $.fn.yiiGridView.update (IIRC)

Edit: Also move ‘click’ out of ‘options’