Issue related to ItemCommand event in DataGrid asp.net
<p>I have asp.net application having DataGrid on the aspx page having some autogenerated columns :</p>

<p>i have bound ItemCommand Event on the grid  as Following :</p>

<pre><code> protected void DataGrid2_ItemCommand(object sender, System.Web.UI.WebControls.DataGridCommandEventArgs e)
        {
            if (e.CommandName == "CheckInventoryAndPrice")
            {


                string itemMainPageLink = E2WConstants.Pages.ITEM_MAIN;
                string itemId = (DataRowView)e.Item.DataItem).Row["ItemId"].ToString();

                //Response.Redirect();
            }
        }
</code></pre>

<p>but i am getting  DataItem Null always :  so how can i get the value of cell of selected row ??</p>

<p>Thanks..</p>
