Try the following:
echo CHtml::button('Delete', array( 'submit'=>array('controllername/actionname',array('id'=>$id)), 'confirm' => 'Are you sure?'
As you will see, button also uses the special htmlOptions clientChange attribute.
Refresh Explain submit , from doc link ():
submit: string, indicates the URL to submit. If the current element has a parent form, this form will be submitted, and if "submit" is not empty, its value will replace the URL of the form. If there is no parent form, the data listed in "params" will be sent instead (via the POST method) to the URL in the "submit" or the currently requested URL if "submit" is empty. Please note that if the "csrf" parameter is true, the CSRF token will also be included in the parameters.
my accent
As you already mentioned that you want to click on the delete action, by default gii generated by actionDelete expects an id in the URL, so I passed the id in the url, ie submit option.
source share