That's it!
Thankyou so much Joanna.
I implemented the ICancelAddNew, and found I had to remove the item using
the itemIndex parameter (this.RemoveAt(itemIndex) ) in the CancelNew
funciton, and it works. (This itemIndex was increasing each time an item was
added, so the second time, the underlying list, seemed to have more items
than the DataGridView it was bound to...)
Thanks again Joanna.
I am off to investigate the BindingList<> "generics" solution you mentioned
as well. As I mentioned, I was using the standard List<> generics approach
we had a couple of limitations with regards to business logic I wanted to
implement but the BindingList approach may well be more flexible in this
regard.
Thanks.
"Joanna Carter [TeamB]" wrote:
> "Stuart" <(E-Mail Removed)> a écrit dans le message de news:
> 1824F9D8-5B8C-47CE-B21A-(E-Mail Removed)...
>
> | Originally I was using Generics as you suggest, however I am extending the
> | custom colleciton in other ways and therefore need to understand / figure
> out
> | why this isn't working.
>
> In that case, does your list class implement ICancelAddNew ? This is
> important and, if it is not there, sounds like it could be the cause of your
> problem
>
> Joanna
>
> --
> Joanna Carter [TeamB]
> Consultant Software Engineer
>
>
>