Step 1: You have to override the file in local folder or just copy app\code\core\Mage\Adminhtml\Block\Customer\Grid.php
to app\code\local\Mage\Adminhtml\Block\Customer\Grid.php
Step 2: Replace below code with
$this->addColumn('name', array(
'header' => Mage::helper('customer')->__('Name'),
'index' => 'name'
));
Replace by
$this->addColumn('namewithprifx', array(
'header' => Mage::helper('customer')->__('First Name'),
'index' => 'firstname',
'type' => 'text',
'width' => '250px',
'sortable' =>false,
'filter' => false,
'renderer' => 'NameSpace_Customergrid_Block_Adminhtml_Renderer_Namewithprifx',
));
Step 3: Create file in NameSpace\Customergrid\Block\Adminhtml\Renderer\Namewithprifx.php
Step 4: Copy below code.
<?php
class NameSpace_Customergrid_Block_Adminhtml_Renderer_Namewithprifx extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
{
public function render(Varien_Object $row)
{
//$getData = $row->getData();
$str=$row->getData('prefix'). " ". $row->getData('fname'). " ". $row->getData('lname');
return $str;
}
}
Step 5: Refresh cache and check the data.