When binding to data from a WCF Data Service (aka oData), you often end up wanting to bind to nested properties on sub-objects that have been been "Expanded" into the main object:
<ig:TextColumn Key="SrvItem.SrvService.AccountID" />
The SrvItem object will either be null or a fully populated object with all its sub-objects also populated - the binding mechanism is smart enough to deal with nulls anywhere along the path - but when you go to group by the column, the grid throws an exception - presumably because that mechanism isn't smart enough to deal with nulls anywhere along the path. It would be nice if this could be fixed.
Hello,
I am looking into this issue for you and I want to make sure I understand what you are doing. Is the situation that you have two objects / entities with a one to one relationship therefore you are displaying them on the same row, however, in some cases there is no corresponding related object / entity therefore those columns will be null and this causes an error when grouping by that column?
Valerie
That is correct - in some rows the ItemID will be null making the resulting SrvItem navigation property also be null. I guess my only reason for bring it up was that Microsoft seems to have made their binding mechanism smart enough to deal with nulls anywhere along the path (either presumably by using reflection to check each property along the path or perhaps just wrapping it all in some exception handling) so maybe to be consistent you should make your grid sort and group functionality also deal with it transparently (i.e. the row in question would sort/group as if the value were null rather than throw an exception because it can't dereference part of the path). Thanks for getting back to me though.