close

直接在GridView裡的RowDataBound事件加入以下的程式碼即可

        If e.Row.RowType = DataControlRowType.DataRow Then
            '滑鼠移至資料列上的顏色
            e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='D6FFAF'")
            '滑鼠離開資料列上的顏色
            e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='white'")
        End If

 

顏色可由色碼表來做更換

arrow
arrow
    全站熱搜

    suhsienchin 發表在 痞客邦 留言(0) 人氣()