Update A Record In Database On Clicking The Button In "yii Bootstrap Tbgridview" Through Ajax Request

hi friends

im using yii bootstrap TbGridView. and i want to update the record in database on clicking the button in Grid through ajax request.

if any one knows then kindly help me .

thanks in advance .

regards :


following is the code of my button . it work well but i want to do this same work with ajax


             'headerHtmlOptions' => array('style' => 'width: 40px'),



			 'value'=> 'CHtml::button("Update",array("class"=>"btn","onclick"=>"document.location.href=\'".Yii::app()->controller->createUrl("tasks/update",array("name"=>"completed_at" ,"value"=>date("Y-m-d H:i:s") ,"pk"=>$data->id))."\'"))'


tell me how can i do this …?