Hey guys
As many of you are well aware I creating an EPOS System
I have a datagrid that stores details about all of the items which the user wishes to buy in the transaction.
However if the user changes his mind I have a feature that cancels the row in the datagrid.
This is my code for this feature:
With Me.DataGridView1
For Each r As DataGridViewRow In .SelectedRows
.Rows.RemoveAt(r.Index)
DataGridView1.Update()
Next
End With
The code functions fine, however a problem arises if I enter a new row into the datagridview, the previous row I recently cancelled appears again.
Does anyone know how I solve this problem??
All ideas welcome :)