title: Magento products grid filter with custom attribute
body: <p>I've added a custom attribute to the products grid in the admin area using the following code in /app/code/local/Mage/Adminhtml/Block/Catalog/Product/Grid.php under function _prepareColumns()</p>
  
  <p>It works fine, but now when searching with any search filter - the new attribute column is showing no values.</p>
  
  <pre><code>$attributeId = Mage::getResourceModel('eav/entity_attribute')-&gt;getIdByCode('catalog_product','custom_column');
  $attribute = Mage::getModel('catalog/resource_eav_attribute')-&gt;load($attributeId);
  $attributeData = $attribute-&gt;getData();
  $frontEndLabel = $attributeData['frontend_label'];
  $attributeOptions = $attribute-&gt;getSource()-&gt;getAllOptions();
  
  $attributeOptions2 = array();
  foreach ($attributeOptions as $value) {
      if(!empty($value['value'])) {
          $attributeOptions2[$value['value']] = $value['label'];
      }
  }
  
  $this-&gt;addColumn('custom_column',
      array(
          'header'=&gt; Mage::helper('catalog')-&gt;__('Custom Column'),
          'width' =&gt; '150px',
          'index' =&gt; 'custom_column',
          'type'  =&gt; 'options',
          'options' =&gt; $attributeOptions2,
  ));
  </code></pre>
  
  <p>And under _prepareCollection() I've added the following code:</p>
  
  <pre><code>$collection = Mage::getModel('catalog/product')-&gt;getCollection()-&gt;addAttributeToSelect('custom_column');
  </code></pre>
  
  <p>I think it's simple but I'm not catching it at the moment, any help is highly appreciated!</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>When searching with filters - the column is populating with values EXCEPT if the filter was the Name column.</p>