One gotcha that I ran into recently was cancelling an AddNew(), and a blank row was still in the BindingList. The workaround to this is calling the CancelNew method from ICancelAddNew, which the BindingList implements.
Nice. Definitely saved. Couple questions/points:
Your person object isn’t thread safe; you should always assign your event to a temp variable, then check that variable to see if its null prior to invoking the event.
Why would you want to explicitly implement IDataErrorInfo? Is it in case your Person object already has an indexer that isn’t listed in the code at the top?
One gotcha that I ran into recently was cancelling an AddNew(), and a blank row was still in the BindingList. The workaround to this is calling the CancelNew method from ICancelAddNew, which the BindingList implements.
Nice. Definitely saved. Couple questions/points:
Your person object isn’t thread safe; you should always assign your event to a temp variable, then check that variable to see if its null prior to invoking the event.
Why would you want to explicitly implement IDataErrorInfo? Is it in case your Person object already has an indexer that isn’t listed in the code at the top?