wongth7,
Don't take this the wrong way but you really would be better off using cjard's suggestion.
Generally speaking, you load an internal dataset with data from a database. When you click the "delete" button, it simply "marks" the record as deleted but the record stays until the the internal dataset is written back to the database and the dataset is cleared. Therefore, you would need to add code to skip a record that is marked as deleted plus more code to deal with all the other related situations (like, what if all the records are marked as deleted, or just the last, or just the first, etc.

).
Cjard's suggestion does all that background coding for you.