Magento 1.9 – Renderer Function Not Working in Order Grid

magento-1.9order-gridrenderer

I don't know what is the problem with my code.

Gird

    $this->addColumn('category', array(
                'header'    => Mage::helper('udropship')->__('Cateogry'),
                'index'     => 'category',
                'sortable'  => false,
                'filter'    => false,
                'renderer'  => 'Unirgy_DropshipPo_Block_Adminhtml_ReportItem_Bundle',
));

Renderer Function

class Unirgy_DropshipPo_Block_Adminhtml_ReportItem_Bundle extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
{
    public function render(Varien_Object $row)
    {
        return "work";
    }
}

Best Answer

Remove index from addcolumn because there is no field called as category in your collection

 $this->addColumn('category', array(
                'header'    => Mage::helper('udropship')->__('Cateogry'),

                'sortable'  => false,
                'filter'    => false,
                'renderer'  => 'Unirgy_DropshipPo_Block_Adminhtml_ReportItem_Bundle',
));