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?
on March 12th, 2007 at 11:54 am
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.
on April 24th, 2007 at 1:56 pm
Getting the most out of .NET data binding…
You’ve been kicked (a good thing) - Trackback from DotNetKicks.com…
on April 24th, 2007 at 2:20 pm
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?