4

Is the column Action very important to being displayed in admin grids? It is actually doing exactly the same thing as "click on selected row" a'm I right ? So if I hide it will it affect anything ?

        if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/view')) {
        $this->addColumn('action',
            array(
                'header'    => Mage::helper('sales')->__('Action'),
                'width'     => '50px',
                'type'      => 'action',
                'getter'     => 'getId',
                'actions'   => array(
                    array(
                        'caption' => Mage::helper('sales')->__('View'),
                        'url'     => array('base'=>'*/sales_order/view'),
                        'field'   => 'order_id',
                        'data-column' => 'action',
                    )
                ),
                'filter'    => false,
                'sortable'  => false,
                'index'     => 'stores',
                'is_system' => true,
                'column_css_class'=>'no-display',
                'header_css_class'=>'no-display',
        ));
    }

To make it invisible added two lines:

'column_css_class'=>'no-display',
'header_css_class'=>'no-display',

instead of removing or comment.

0

2 Answers 2

3

Generally, the Action column is not important as long as it is doing the same as clicking on the row. Action tab is added when there are more operations to perform on a row, like in the CMS Pages grid you can see there is an Action column that has preview action. Here both click on row and preview performs different operations.

So you should only remove it if both the operations are the same.

3

$this->addColumn('action', array(...)) adds the action column in the grid. Yes if you wish to remove you can. You can remove from css, commenting or by removing the whole code.It will not break your grid or will not affect any of code breaking.

But talking from UI point of view since you have the edit form its good to keep the action column so user knows the action and he can navigate there.

3
  • I'm sorry I couldn't select your answer as Piyush's response is a bit more more precise/descriptive :) but of course up voted. Thank you
    – Rob D. A.
    Jun 29, 2017 at 12:19
  • never mind its important you got the answer and it helped you.
    – Priyank
    Dec 27, 2017 at 8:46
  • ?? Yes ... and happy after christmas .....
    – Rob D. A.
    Dec 27, 2017 at 8:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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