I have form grid with selectbox in grid. so i would like to make row unclickable because when i try to click on select box it trigger checkbox too.


any help would be very appreciate.

  • in which magento version? Commented Feb 14, 2017 at 5:17
  • magento version 1.8
    – MageLerner
    Commented Feb 14, 2017 at 5:20
  • you can try the answer given in grid.php Commented Feb 14, 2017 at 5:24

4 Answers 4


This is how i achieve this.

This is my grid constructor and code is as below.it will stop fire onrowclick event on selectbox click.

public function __construct()
    $this->setUseAjax(true); // Using ajax grid is important
    $this->setDefaultFilter(array('customer_ids'=>1)); // By default we have added a filter for the rows, that in_products value to be 1
    $this->setSaveParametersInSession(false);  //Dont save paramters in session or else it creates problems
    // added click on selectbox support
    serializerController.prototype.rowClick = serializerController.prototype.rowClick.wrap(function(o, grid, event) {
        var tagName = Event.element(event).tagName
            isSelect = (tagName == 'SELECT' || tagName == 'OPTION');
        if (!isSelect) {
            o(grid, event);

Please use the following code in grid.php for magento 1.x.x:

public function getRowUrl($row)
    return false;
  • This will remove url or not remove click event
    – MageLerner
    Commented Feb 14, 2017 at 5:27
  • 1
    click event is coming because of the row url , so if you want to remove click event, you have to remove row url. Commented Feb 14, 2017 at 5:31
  • I did but nothing was changed :(
    – MageLerner
    Commented Feb 14, 2017 at 5:40
  • clear cache and try. Commented Feb 14, 2017 at 5:45

By adding the following method


to my grid class (that overrides a core grid Mage_Adminhtml_Block_Catalog_Product_Grid), that returns some fake JS function, like this

public function getRowClickCallback()
    return 'fakeJsFunction';

And this can help you in achieving your requirement


If you will not pass "rowUrl" function in argument, In grid section Row URL will not be set.

<block class="Magento\Backend\Block\Widget\Grid\ColumnSet" as="grid.columnSet" name="adminhtml.promo.quote.grid.columnSet">
         <argument name="rowUrl" xsi:type="array">
            <item name="path" xsi:type="string">ezerus_shippingreport/*/*</item>
            <item name="extraParamsTemplate" xsi:type="array">
                <item name="id" xsi:type="string">getId</item>
    <block class="Magento\Backend\Block\Widget\Grid\Column" as="entity_id">
            <argument name="header" xsi:type="string" translate="true">ID</argument>
            <argument name="index" xsi:type="string">entity_id</argument>
            <argument name="column_css_class" xsi:type="string">col-id</argument>
            <argument name="header_css_class" xsi:type="string">col-id</argument>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.