''设置特殊行背景色
    Private Sub DataGridView1_CellFormatting(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellFormattingEventArgs) Handles DataGridView1.CellFormatting
        If Me.DataGridView1.Columns(e.ColumnIndex).Name = "备注" Then
            If e.Value IsNot Nothing Then
                If e.Value = "黑名单" Then
                    Me.DataGridView1.Rows(e.RowIndex).DefaultCellStyle.BackColor = Color.YellowGreen
                End If
            End If
        End If
    End Sub

相关文章:

  • 2021-10-02
  • 2021-05-22
  • 2021-05-02
  • 2021-08-11
  • 2022-12-23
  • 2021-07-23
猜你喜欢
  • 2022-01-30
  • 2022-12-23
  • 2021-12-19
  • 2021-10-03
  • 2022-12-23
  • 2022-12-23
  • 2021-11-12
相关资源
相似解决方案