I have the following code :

Code:


    Private Sub dgPackage_CellFormatting(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellFormattingEventArgs) Handles dgPackage.CellFormatting
        Try   
            SetRowBackColor(Me.dgPackage, "colPkgAdjustmentRange")
          
            If Me.dgPackage.Rows.Count > 0 Then
                For intRow = 0 To dgPackage.Rows.Count - 1
                    If dgPackage.Rows(intRow).Cells("colPkgAdjustmentRange").Value = "AFTER" Then
                        If dgPackage.Rows(intRow).Cells("colPkgApprovalStatus").Value.ToString.Contains("PENDING") Then
                            Dim imageColumn As DataGridViewImageCell = CType(dgPackage.Rows(intRow).Cells("colPkgImage"), DataGridViewImageCell)
                            imageColumn.Value = My.Resources.ResourceFile.Pending
                        End If
                    End If
                Next
            End If
        Catch ex As Exception
            Throw
        End Try
    End Sub

The problem is the datagridview will keep on blinking and it will not continue the next action...