> I need to know when user cancelled adding a new row to the
> DataGridView.
[quoted text clipped - 6 lines]
> but code in the DGV_UserAddedRow was already executed and I need it to
> be undone. How?
You may be able to check the DataGridView.CurrentRow.IsNewRow property and
deal with the bound values appropriately. If using an IBindingList implementation,
you may be able to just call .CancelEdit.
Jim Wooley
http://devauthority.com/blogs/jwooley/default.aspx
Paul Jones - 25 Jul 2006 14:29 GMT
Hi Jim,
thanks for your reply. I'm afraid this is not what I need. Changes made
in the DGV_UserAddedRow function do not include changes in the DGV.
That's why I need to catch this "new-row-editing-cancelled" to get all
those things to the previous state. Nevertheless, I'll try the
DataGridView.CurrentRow.IsNewRow in UserDeletedRow or RowsDeleted, maybe
it will work.
With regards
Paul Jones
Jim Wooley napsal(a):
>> I need to know when user cancelled adding a new row to the
>> DataGridView.
[quoted text clipped - 12 lines]
> Jim Wooley
> http://devauthority.com/blogs/jwooley/default.aspx