Add New Column in Admin Product Grid In Magento 2
<p>I want to add a new column in Product Grid in Magento 2. I have created <code>di.xml</code> file in module <code>etc</code> folder with the below code:</p>

<pre><code>&lt;?xml version="1.0"?&gt;
&lt;config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"&gt;
    &lt;preference for="Magento\Catalog\Block\Adminhtml\Product\Grid" type="Package\Module\Block\Grid" /&gt;
&lt;/config&gt;
</code></pre>

<p>In The <code>Grid</code> block, I have the below code: </p>

<pre><code>namespace Package\Module\Block;
use Magento\Store\Model\Store;
class Grid extends \Magento\Catalog\Block\Adminhtml\Product\Grid
{
    protected function _prepareColumns()
    {

        $this-&gt;addColumn(
            'newfield',
            [
                'header' =&gt; __('Test Name'),
                'index' =&gt; 'name',
                'class' =&gt; 'xxx'
            ]
        );

        return parent::_prepareColumns();
    }
}
</code></pre>

<p>Can someone guide me for this. </p>