W
William Ryan
dim row as datarowThis is a little different approach, but it will work for
you...
int i = dv.Find (val);
if (i > -1)
dv.Delete (i);
else {
//do nothing or alert the user
}
Just make sure that you haven't set allowdelete to
false. Also, after the delete the rowstate will
be .deleted .. if you need to undo it you'll need to use
rejectChanges on the DataTable that the View is based on.
Good Luck,
Bill
W.G. Ryan
www.knowdotnet.com
you...
int i = dv.Find (val);
if (i > -1)
dv.Delete (i);
else {
//do nothing or alert the user
}
Just make sure that you haven't set allowdelete to
false. Also, after the delete the rowstate will
be .deleted .. if you need to undo it you'll need to use
rejectChanges on the DataTable that the View is based on.
Good Luck,
Bill
W.G. Ryan
www.knowdotnet.com