Have you ruled out the d'oh options of maybe hitting a breakpoint on an accessor property (possibly in a different thread) for this.bndLocation.DataSource?
Martijn
2010-10-09 18:26:27
Have you ruled out the d'oh options of maybe hitting a breakpoint on an accessor property (possibly in a different thread) for this.bndLocation.DataSource?
I don't know what your problem is, but I can point out some things that you are doing which could be causing problems:
You should not access "usr" within a lambda expression since it is a closure within the foreach loop, and you can get some really weird behavior here. (the value of "usr" will be taken as the last one instead of the one it was created with.
It doesn't seem to me that this would be your problem. To see if it is, do this:
var usrTemp = usr;
Found = new List<Business.Location>(this._AllLocations.Where((a, b) => a.Distributor == usrTemp.Distributor));
To see if this is a problem change the foreach loop:
foreach (var usr in this._AllUsers.ToArray())