保持选定单元格前景色不变

1、

    Private Sub DataGridView1_CellFormatting(sender As Object, e As DataGridViewCellFormattingEventArgs) Handles DataGridView1.CellFormatting
        '保持选定单元格前景色不变
        e.CellStyle.SelectionForeColor = e.CellStyle.ForeColor
    End Sub

 

posted @ 2020-02-27 09:03  rf8862  阅读(140)  评论(0)    收藏  举报