Try the following way:
Add the following code in config.xml which is related to overwrite grid
app/code/local/SR/MagentoCommunity/etc/config.xml
<?xml version="1.0"?>
<config>
<modules>
<SR_MagentoCommunity>
<version>0.0.0.1</version>
</SR_MagentoCommunity>
</modules>
<global>
<models>
<sr_magentocommunity>
<class>SR_MagentoCommunity_Model</class>
</sr_magentocommunity>
</models>
<blocks>
<sr_magentocommunity>
<class>SR_MagentoCommunity_Block</class>
</sr_magentocommunity>
<adminhtml>
<rewrite>
<customer_grid>SR_MagentoCommunity_Block_Adminhtml_Customer_Grid</customer_grid>
</rewrite>
</adminhtml>
</blocks>
</global>
</config>
And
app/code/local/SR/MagentoCommunity/Block/Adminhtml/Customer/Grid.php
<?php
class SR_MagentoCommunity_Block_Adminhtml_Customer_Grid extends Mage_Adminhtml_Block_Customer_Grid
{
/**
* @param Mage_Customer_Model_Resource_Customer_Collection $collection
*/
public function setCollection($collection)
{
$collection->addAttributeToSelect('taxvat');
parent::setCollection($collection);
}
protected function _prepareColumns()
{
parent::_prepareColumns();
$this->addColumnAfter('taxvat', array(
'header' => Mage::helper('customer')->__('VAT Number'),
'index' => 'taxvat'
), 'customer_since');
$this->sortColumnsByOrder();
return $this;
}
}
app/etc/modules/SR_MagentoCommunity.xml
<?xml version="1.0"?>
<config>
<modules>
<SR_MagentoCommunity>
<active>true</active>
<codePool>local</codePool>
</SR_MagentoCommunity>
</modules>
</config>
