I have this column i added. How can i sort it? i can click on sort, but well it doesnt really sort right.

My grid looks like:

$this->addColumn('sn_suppliers_noos', array(
            'header' => Mage::helper('purchase')->__('NOOS'),
            'index' => 'product_id',
            'renderer' => 'MDN_Purchase_Block_Widget_Column_Renderer_SupplyNeeds_Noos',
            'type' => 'number'

My renderer looks like:

public function render(Varien_Object $row)

        $value =  $row->getData($this->getColumn()->getIndex());        
        $product = Mage::getModel('catalog/product')->load($value);
        $value= $product->noos;

        return $value;
  • Possible duplicate of this – Kul Nov 7 '16 at 15:35
  • Well its not a duplicate. What you're linkin to isnt a custom attribute, and therefore it already lies in the array and not from a renderer, which would make it alot easier :O – RappY Nov 8 '16 at 9:43

Your Answer

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

Browse other questions tagged or ask your own question.