Disable Massaction Checkbox Checked on Grid Row Click

checkboxgridmassaction

I want to cancel default behavior on grid row click – checking massaction checkboxes. The another default action – is redirecting to an editing page, and I've disabled it in this way – add this method to my grid –

public function getRowUrl($row)
{
    return '';
}

I've also tried to use openGridRow() function, but it didn't work (I've placed it in my own js file).
But I need to disable checkbox checking too. Does anybody know, how to do it?
If it's possible to do with openGridRow(), where I need to place it?

Best Answer

With openGridRow you were already close to the solution. This is the default JS callback, but you can change it with the row_click_callback property of the grid widget. For no action at all, use:

$this->setRowClickCallback(null);

The default value is set in Mage_Adminhtml_Block_Widget_Grid::__construct(), so you can override the constructor and add this line after parent::__construct()