I'm using DatagridView in my VB.Net Project. Here the data can only be committed after users confirmation via a separate button. Though the user can delete the added rows till that time. I'm trying to make deleted rows invisible by following code:
DataGridView1.Rows(selectedIndex).Visible = False
However, getting following runtime error:
System.InvalidOperationException: "Uncommitted new row cannot be made invisible"
Please help in resolving the error or suggest an alternative to achieve the requirement.
Thanks in advance-*
Don't commit the changes back to the database. Refresh the data set you've bound the grid to and whalla! No more uncommited records.
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)