Magento – Hide a Grid’s Column in Backend

admincolumngridgrid-serlization

I just want to have the column in the grid but not visible.

Is it possible ? any parameter I should pass to addColumn()

Best Answer

You column can look like this:

$this->addColumn('column_id_here', array(
    'header' => Mage::helper('helper_name_here')->__('Column header here'),
    'index' => 'column_index_here',
    'column_css_class'=>'no-display',//this sets a css class to the column row item
    'header_css_class'=>'no-display',//this sets a css class to the column header
));

Basically, you can use column_css_class and header_css_class to add any CSS classes to the column and then work your magic in the CSS file. In Magento admin default theme no-display class has 'display:none' on it.