.ToArray() seems to work, even on the complex one. Good call, I guess I tried everything else but missed that.
Thanks a lot.
When I try this simplified code (without the ToArray), I get an exception from within the .NET code. What happens in this case is that the grid needs to ask the .NET BindingManager for information regarding the type of items that exist in the source that it is bound to. From here, the BindingManager ends up calling Reset on the underlying list, which throws a NotImplementedException; there is code in the .NET framework to handle a NotSupportedException when this is called, but not a NotImplementedException. The ToArray works because the grid (and mainly the underlying BindingManager) know how to deal with an array.
-Matt
I tried this simple code and got the same problem:
var nums = from i in array
ultraGrid1.DataSource = nums;
This could be because of the deffered execution. When I tried this:
var nums = (from i in array
Everything is OK. ToArray is executing the query before binding.
I'm haven't really used LINQ, so I can't comment on your queries and hopefully someone else will chime in, but you definitely should never be experiencing a NullReferenceException within the Infragistics code, so you should submit this to Developer Support.