/**
  * Prepare and set collection of grid
  *
  * @return Mage_Adminhtml_Block_Widget_Grid
  */
 protected function _prepareCollection()
 {
     if ($vendor = Mage::helper('smvendors')->getVendorLogin()) {
         $grandParent = get_parent_class(get_parent_class($this));
         $collection = Mage::getResourceModel($this->_getCollectionClass());
         $collection->join(array('smo' => 'smvendors/order'), "main_table.order_id = smo.order_id\n                    AND smo.vendor_id = {$vendor->getId()}\n                    AND main_table.vendor_id = {$vendor->getId()}", array('vendor_increment_id' => 'smo.increment_id'));
         $this->setCollection($collection);
         call_user_func(array($grandParent, '_prepareCollection'));
     } else {
         return parent::_prepareCollection();
     }
 }