代码导致冻结形式

时间:2014-05-01 11:21:01

标签: vb.net winforms

我只想在单元格中的值是certin值时显示图例,我正在使用此

Private Sub dgDeliverys_DataBindingComplete(sender As System.Object, e As System.Windows.Forms.DataGridViewBindingCompleteEventArgs) Handles dgDeliverys.DataBindingComplete
    For Each dr As DataGridViewRow In Me.dgDeliverys.Rows
        'condition for each row based on cell's input is put here
        If dr.Cells("isNotFound").Value = True Then
            dr.DefaultCellStyle.BackColor = Color.Red
            dr.DefaultCellStyle.ForeColor = Color.White
        End If

    Next
End Sub

现在我的网格当时只有几行。但它似乎导致形式冻结,任何想法?

0 个答案:

没有答案