This question is locked. New answers and comments are not allowed.
I'm using Silverlight 3 Q1 2010 version of the controls and specifically trying to set the ItemsSource for a RadChart. I can successfully set my list using a lambda expression or a LINQ query expression:
OR
If I change the output of the LINQ query expression, however:
the code blows up with a NullReferenceException. Has anyone come across this issue before? Querying against it works as long as the output isn't changed. If the output's changed in any way (in this case different class with the same properties), it throws an error.
RadChart1.ItemsSource = Assignments.Where(x => x.StatusCode != "Status1"); |
OR
RadChart1.ItemsSource = (from x in Assignments |
where x.StatusCode != "Status1" |
select x); |
If I change the output of the LINQ query expression, however:
RadChart1.ItemsSource = (from x in Assignments |
where x.StatusCode != "Status1" |
select new NewStatus |
{ |
StatusCode = x.StatusCode, |
StatusCount = x.StatusCount |
}); |
the code blows up with a NullReferenceException. Has anyone come across this issue before? Querying against it works as long as the output isn't changed. If the output's changed in any way (in this case different class with the same properties), it throws an error.