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

1、

    Private Sub DataGridView1_CellFormatting(sender As Object, e As DataGridViewCellFormattingEventArgs) Handles DataGridView1.CellFormatting
        '保持选定单元格前景色不变
        e.CellStyle.SelectionForeColor = e.CellStyle.ForeColor
    End Sub
原文地址:https://www.cnblogs.com/rf8862/p/12370381.html