Grid View Add Attribute Not on Headers

  • Thread starter Thread starter bdog4
  • Start date Start date
B

bdog4

Is there a way to not apply this to the first row which is my header?
Thanks

Protected Sub GridView1_RowCreated(ByVal sender As Object, ByVal e
As System.Web.UI.WebControls.GridViewRowEventArgs) Handles
GridView1.RowCreated

If e.Row.RowState = DataControlRowState.Alternate OrElse
e.Row.RowState = DataControlRowState.Normal Then
e.Row.Attributes("onmouseover") =
"colorrow(this,'PaleGreen');"
e.Row.Attributes("onmouseout") =
"colorrow(this,'#FFFFFF');"
End If

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top