asp.net - DataControlRowType exclude to column
<p>I am new to ASP.NET</p>

<p>This code below is alternated the row background color and also clickable on a row to view the DetaisView for individual record.  </p>

<p>In the GridView1, I have two last columns (8, 9) for Edit and Delete, which I do not want these two columns to be clickable for the DetailsView.  How do I exclude those last columns (8,9)?</p>

<p>Sorry, I tried to format the below code to look nicer for you guys, but couldn't make it looks nicer after the posted. Somehow all the spaces/tabs before codes are removed.</p>

<pre><code>Private Sub GridView1_RowCreated(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView1.RowDataBound  
        if e.Row.RowType = DataControlRowType.DataRow then

                Dim RowNum as Integer
                RowNum = e.Row.RowIndex

                if RowNum mod 2 = 1 then

                e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#DDDDDD'")

                else

                e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#FFFFFF'")

                end if

            e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='DeepSkyBlue'")
            e.Row.Attributes("onclick") = Me.Page.ClientScript.GetPostBackClientHyperlink(Me.GridView1, "Select$" &amp; e.Row.RowIndex) 

        End If
End Sub
</code></pre>

<p>Thanks in advance,</p>
