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 therow_click_callback
property of the grid widget. For no action at all, use:The default value is set in
Mage_Adminhtml_Block_Widget_Grid::__construct()
, so you can override the constructor and add this line afterparent::__construct()