i've customized my product grid an added some custom columns. One of them displays the number of orders of this product. In a new extension i did a rewrite of the class Mage_Adminhtml_Block_Catalog_Product_Grid and the functions _prepareColumns() and _prepareCollection(). I've added the column with $this->addColumn(...) and used a renderer to get and return the data.
Everything works fine except for the sorting and the filter. Clicking the respective buttons in the product grid doesn't have an effect on the rows.
Can someone help me fix that problem?
Thanks a lot!
is the number of orders actually an int attribute of product? If not, you will have to create customized sort and filter method for this column
First check the _prepareCollection() function, return the collection and check if your fields are included in this or not, you may required to use Join if the your column is not included into the collection.