A solution I have used is to add a format type for Grid :
into lib/Grid/advenced.php
I've added a smart button:
function init_smartButton($field){
@$this->columns[$field]['thparam'].=' style="width: 40px; text-align: center"';
$this->js(true)->find('.button_'.$field)->button();
}
function format_smartButton($field){
$product = $this->add('Model_Product')->load($this->current_id);
if($product->acceptButton($field))
{
$this->current_row_html[$field]='<button type="button" class="'.$this->columns[$field]['button_class'].'button_'.$field.'" '.
'onclick="$(this).univ().ajaxec(\''.$this->api->url(null,
array($field=>$this->current_id,$this->name.'_'.$field=>$this->current_id)).'\')">'.
(isset($this->columns[$field]['icon'])?$this->columns[$field]['icon']:'').
$this->columns[$field]['descr'].'</button>';
}else{$this->current_row_html[$field]='';}
$product->destroy();
}
It's just like a normal button but it create the button only if my Product allows it.
then in my grid :
$grid->setModel('Model_Product')->addCondition('buyer_id','=',$userID);
$grid->addColumn('smartButton' ,'1');
$grid->addColumn('smartButton' ,'2');
$grid->addColumn('smartButton' ,'3');
$grid->addColumn('smartButton' ,'4');
$grid->addColumn('smartButton' ,'5');
$grid->addPaginator(5);
It's not perfect but for now it will be ok!
If you have something better to suggest I will be pleased to improve it.