getting data from gridview returns nothing
<p>i like to get data from second column of my grid view by code like below, but it returns nothing (di.Cells[1].Text) , please help what is the problem:</p>

<pre><code>protected void btnShowAddTransmittaltoCon_Click(object sender, EventArgs e)
{
    Transmittallistfortest transmittalList = (Transmittallistfortest)DetailsView1.FindControl("Transmittallistfortest1");
    GridView g3 = transmittalList.FindControl("GridViewTtransmittals") as GridView;
    foreach (GridViewRow di in g3.Rows)

    {

        RadioButton rad = (RadioButton)di.FindControl("RadioButton1");
        //Giving Error:Object reference not set to an instance of an object.
        if (rad != null &amp;&amp; rad.Checked)
        {
            var w = di.RowIndex;

            Label1.Text = di.Cells[1].Text;
        }
</code></pre>

<p>the aspx is like below:</p>

<pre><code> &lt;asp:GridView ID="GridViewTtransmittals" runat="server" AutoGenerateColumns="False" 
          BorderStyle="None" ShowHeader="False" Width="100%" DataKeyNames="TransID"  onrowdatabound="GridViewTtransmittals_RowDataBound"
        onrowdeleting="GridViewTtransmittals_RowDeleting"&gt;
          &lt;columns&gt;
              &lt;asp:TemplateField&gt;
                  &lt;ItemTemplate&gt;
                      &lt;asp:RadioButton ID="RadioButton1" runat="server" GroupName="Transmittal" AutoPostBack="True" 
        OnCheckedChanged="RadioButton1_CheckedChanged" /&gt;

                  &lt;/ItemTemplate&gt;
              &lt;/asp:TemplateField&gt;
            &lt;asp:hyperlinkfield DataNavigateUrlFields="TransId" 
              DataNavigateUrlFormatString="~/Copy of Transmittal.aspx?TransId={0}" DataTextField="TRANSMITTAL" 
              HeaderText="Transmittal" /&gt;
            &lt;asp:CommandField ButtonType="Button" ShowDeleteButton="true" /&gt;
</code></pre>
