I've discovered some more details about this bug, so I'm hoping with this additional insight, someone will have an idea for me.
If I set a row's Visible property to false, it is hidden as I would expect. However, if the row beneath where the hidden row should be (so row3 in my original post) is selected -- meaning the entire row is selected -- and this row is deleted from the underlying DataTable (which subsequently deletes the row from the DataGridView), then the hidden row is suddenly visible again! It must be the row directly beneath where the hidden row exists, and IT MUST BE THE LAST ROW of the DataGridView. In other words, if row4 is deleted from the scenario below:
row0: Visible = true
row1: Visible = true
row2: Visible = false
row3: Visible = true
row4: Visible = true
so if row4 (the last row) is selected when it is removed, the bug does not occur. But in this scenario:
row0: Visible = true
row1: Visible = true
row2: Visible = false
row3: Visible = true
if row3 is selected when it is removed, the bug DOES occur (because it is the last row in the DGV).
Why is this occurring? Is this a "bug" or intended behavior of the DGV? Does anyone have any suggestions for a workaround?
Thanks,
Rick