2013年9月25日 星期三

GridView72絕技之一~螢光棒效果


  Protected Sub GridView1_RowDataBound(sender As Object, e As GridViewRowEventArgs)
        Dim i As Integer
        For i = 0 To GridView1.Rows.Count - 1
            If e.Row.RowType = DataControlRowType.DataRow Then
              e.Row.Attributes.Add("onmouseover", "c=this.style.backgroundColor;this.style.backgroundColor='#CEFF63'")
                e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=c")
            End If
        Next
   
 End Sub

沒有留言:

張貼留言