Make first and last column not clickable
<p>I have a table being generated in an ASP.net web app. The table has 4 columns. Currently each cell of each row can be clicked to get more detailed info. However, I do not want the first and the last cell in each row to be clickable. How can I make it so that only the first second and third cell can be clicked?</p>

<p>Below is some of the code (from the .cs file):</p>

<pre><code>if(e.Row.RowType == DataControlRowType.DataRow)
         {
            e.Row.BackColor = TRADER_BACKCOLOR;
            e.Row.Cells[0].Font.Bold = true;
            e.Row.Attributes.Add("onmouseover", "style.backgroundColor = 'Silver'");
            e.Row.Attributes.Add("onmouseout", "style.backgroundColor = '" + TRADER_HEX + "'");
            e.Row.Attributes.Add("onclick", "RowClick(this, '" + e.Row.Cells[0].Text + "');");
</code></pre>

<p>From the .aspx file:</p>

<pre><code>function RowClick(caller, id)
      {
         if(document.getElementById(id).style.display == "block")
         {
                if(last != "" &amp;&amp; parent == id)
                {
                    HideDetailed();
                }
            document.getElementById(id).style.display = "none";
         }
         else
         {
            document.getElementById(id).style.display = "block";
         }
      }
</code></pre>
