I'm binding a grid to some SQL data via WCF Data Services (i.e.oData) very similar to the nicely done ODataXamGrid example I found on your blog however my schema is considerably more complex than Northwind unfortunately. I've been able to deal with all the issues except a few:
1. I have a SrvItem table that does parent/child via a column relationship where you have ParentItemID and ItemID and ParentItemID is null for the top level nodes and set to the ItemID of the parent for the child nodes. Ideally, for display purposes, I would only show the parent type rows and then use an unbound column to aggregate and display the field I want from all the children under that parent but I haven't been able to figure out how to do that. Anyone ever do something similar? Had the parent/children been stored in different tables via a foreign key relationship it would be easy, but since they are all in one table it doesn't exactly fit the odata paradigm very well. Seems like, after all the SrvItems are loaded, if I could somehow iterate the collection and remove the children but as I do so, accumulate the one field I want from each child and somehow stick that aggregate value into my UnboundColumn on the parent it would work but I fear it is probably easier said than done. Anyone ever done something similar?
2. How do you make the filtering stuff work for null values? In the aforementioned example the ParentItemID is an Int32 type field but null is used - null shows up as blank - but I can select = from the filter option and leave it blank and have it match. Similarly, in other tables with dates, this particular package uses null to represent. If I setup ValueConverters will filtering automatically use them?
In order to show only the null parent elements, you would probably want to have your IEnumberable provided with only those entries, which child collections for your child rows.
If you use an unbound column to show the child summation data, you could probably use a ValueConverter on the column and when an object is passed into it return out the summation data.
2) You are going to have to write up a custom summary operand to handle this case.
http://help.infragistics.com/NetAdvantage/Silverlight/2010.2/CLR4.0/?page=xamGrid_Create_a_Custom_Summary.html