Infrid Infrid - 1 year ago 108
PHP Question

Magento grid column position

I'm editing the order grid by adding custom columns like this

$this->addColumn('pagamenti', array(
'header' => 'Paymentsource',
'align' =>'left',
'type' => 'text',
'renderer' => 'Blablabla_Adminhtml_Block_Sales_Order_Renderer_lol'

but every column is positioned on the far right of the table, no matter where I call addColumns.

Is there a way to force the position?


Answer Source

You can probably use the addColumnAfter function.

$this->addColumnAfter('pagamenti', array(
  'header'    => 'Paymentsource',
  'align'     =>'left',
  'type'    => 'text',
  'renderer' => 'Blablabla_Adminhtml_Block_Sales_Order_Renderer_lol'
), 'id_of_column_to_be_after');
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download