I have gotten as far as binding my xamgrid to my RIA data source.. it looks pretty good except I am having trouble getting the heirarchy working properly. Attached is a screencap of my .edmx and data source on the client along with what the grid looks like.
I can't figure out why modifiedstamp doesn't show up on the main row but as a child?
I also can't figure out why Supervises doesn't show up as a child band?
I'm used to the winforms infragistics grid so maybe I'm just going about things the wrong way.
If someone can point me at a heirarchical RIA xamgrid example that would get me going too.
Hi,
What you define in the DataSources window won't map to the xamGrid. This is a limitation of VS.
A Columnlayout (i.e. childband) is autoGenerated when a property in your data is of type IEnumerable. I don't know what type modifiedStamp is, however, it's most likely an IEnumerable of some sort. As for Supervises, its hard to say without actually knowing its type.
However, your best bet is probably to manually create your columns instead of AutoGeneration.
http://help.infragistics.com/NetAdvantage/Silverlight/2010.3/CLR4.0/?page=SL_xamGrid_Columns.html
http://help.infragistics.com/NetAdvantage/Silverlight/2010.3/CLR4.0/?page=SL_xamGrid_Define_Column_Layout.html
-SteveZ
SteveZ, thanks so much for your help..
ModifiedStamp is mapped to a SQL timestamp column and is of type System.Byte[] which I suppose would explain why it's showing up as a child band.
Supervises is of type System.ServiceModel.DomainServices.Client.EntityCollection<UserRelationship> where UserRelationship is another EF class. EntityCollection implements IEnumerable.
In my reading I discovered the default behaviour of WCF RIA is to NOT send child collections even if they are eagerly loaded on the server. You can force it with the [Include] tag but it sounds like the whole thing is really designed around lazy loading. I suspect this is why my child bands didn't show up.
I'd like to understand autogeneration a little better before I give up on it.. is there a way to prevent autogeneration of specific child bands or columns? For example on my ModifiedStamp? Or is there some way to hide them like I used to with the winform ultragrid? Also does autogeneration support EntityCollection<> ?
Greg