Hello,
I have a DataGridView in my VB.net Form. I need to make some rows invisible based on a value. As there is not GridviewrowdataBound, I am trying to achieve it as shown in the below Code
Private Sub DataGridView1_CellFormatting(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellFormattingEventArgs) Handles DataGridView1.CellFormatting
If DataGridView1.Rows(e.RowIndex).Cells("ApplicationIDPKDataGridViewTextBoxColumn").Value <> "1" Then
DataGridView1.Rows(e.RowIndex).Visible = False
End If
End Sub
When I try to do this I am getting the Uncommitted new row cannot be made visible error.
Any thoughts??