The problem here is that the multiselect attribute value is store as comma separated value in database. When we send single value from the selection list, the filter doesn’t work properly.
The solution is to use filter_condition_callback in addColumn.
Here is the code:-
$this->addColumn(‘categories’,
array(
‘header’=> Mage::helper(‘mymodule’)->__(‘Categories’),
‘index’ => ‘categories’,
‘width’ => ‘150px’,
‘type’ => ‘options’,
‘options’ => $categories,
‘filter_condition_callback’
=> array($this, ‘_filterCategoriesCondition’),
));
The callback function is:-
protected function _filterCategoriesCondition($collection, $column)
{
if (!$value = $column->getFilter()->getValue()) {
return;
}
$this->getCollection()->addFieldToFilter(‘categories’, array(‘finset’ => $value));
}
The similar thing is done in Mage_Adminhtml_Block_Cms_Block_Grid class to filter Store View.
Hope this helps. Thanks.