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?
I am a software developer and technical leader in Columbus, OH, specializing in software solutions, project leadership, and Agile coaching and training in a wide range of industries and environments. Find out more here...
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?