title: Magento 1.9 Export functionality is not working in custom grid
body: <p>I was created a grid in which I listed courier tracking number which were assigned to the orders.I add a export csv button in this grid.When I click on export button it gives an error <strong>Fatal error: Call to a member function getCsv() on boolean</strong> .</p>
  
  <p><strong>Controller Code</strong> </p>
  
  <pre><code>&lt;?php
      class Mage_OrderFulfillment_Adminhtml_TrackingnumbersController extends Mage_Adminhtml_Controller_Action {
  
          public function indexAction() {
              $this-&gt;loadLayout();     
              $this-&gt;renderLayout();  
          }
  
          public function exportCsvAction(){
              $fileName   = 'tracking_numbers.csv';
              $content    = $this-&gt;getLayout()-&gt;createBlock('orderfulfillment/adminhtml_trackingnumbers_grid');
              $this-&gt;_prepareDownloadResponse($fileName, $content-&gt;getCsv());
          }   
      }
  </code></pre>
  
  <p><strong>Grid Code</strong></p>
  
  <pre><code>&lt;?php
  
      class Mage_OrderFulfillment_Block_Adminhtml_Trackingnumbers_Grid extends Mage_Adminhtml_Block_Widget_Grid
      {
        public function __construct()
        {
            parent::__construct();
            $this-&gt;setId('mage_orderfulfillment_trackingnumbers_grid');
            $this-&gt;setDefaultSort('id');
            $this-&gt;setDefaultDir('DESC');
            $this-&gt;setSaveParametersInSession(true);
        }
  
        protected function _prepareCollection()
        {
            $collection = Mage::getModel('orderfulfillment/trackingnumbers')-&gt;getCollection();
            $this-&gt;setCollection($collection);
            return parent::_prepareCollection();
        }
  
  
        protected function _prepareColumns()
        {
              $this-&gt;addColumn('id', array(
                  'header'    =&gt; Mage::helper('OrderFulfillment')-&gt;__('ID'),
                  'align'     =&gt;'right',
                  'width'     =&gt; '50px',
                  'index'     =&gt; 'id',
              ));
  
              $this-&gt;addColumn('tracking_number', array(
                  'header'    =&gt; Mage::helper('OrderFulfillment')-&gt;__('Tracking Number'),
                  'width'     =&gt; '150px',
                  'index'     =&gt; 'tracking_number',
              ));
  
              $this-&gt;addExportType('*/*/exportCsv', Mage::helper('OrderFulfillment')-&gt;__('CSV'));
              return parent::_prepareColumns();
          }
      }
  </code></pre>