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

1、

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

猜你喜欢

转载自www.cnblogs.com/rf8862/p/12370381.html