I have a problem with a filter in my module in the admin grid.
My problem: The filter for columns with a custom renderer does not work.
public function _prepareColumns() { $this->addColumn('entity_id', array( 'header' => 'ID', 'index' => 'entity_id', 'width' => '30px' )); $this->addColumn('author', array( 'header' => 'Author', 'index' => 'author', 'renderer' => 'Test_Block_Adminhtml_Vj_Renderer_Author' ));
renderer
class Test_Block_Adminhtml_Vj_Renderer_Author extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract { public function render(Varien_Object $row) { $value = $row->getData($this->getColumn()->getIndex()); $autor = Mage::getModel('test/test')->load($value); return ($author->getName() . ' ' . $author->getSurname()); } }
The author in the grid shows, for example, "George W. Bush", but if I try to write a filter (for example, "Boo"), the filter will return a zero line.: - /
Any idea? thanks.
source share