Question Datatable delete row

magicscreen

New member
Joined
Jun 30, 2011
Messages
1
Programming Experience
10+
I am running windows 7 and vb.net 2010.

I have the following code:
drOutlookRules.Delete()
dtOutlookRules.AcceptChanges()

I am only using a Datatable without using a dataset because I have inherited this application.

The code works by deleting the information for the record from the datatable.

After deleting the record, I then move to the Next record (if there is one)

However, when I try to move back again, I expect to move to the record just prior to the one I deleted but I receive a message stating that I moved to a record with no data.

How do I reconstruct the datatable to close up the holes left by deleted records so this doesn't happen.

Thank you,

magicscreen
 
Back
Top