views:

45

answers:

0

Only at runtime do I know what to display in my Silverlight Grid control. The control will pull from a RIA Services DomainServices source. In the middle tier, I have to transform an EF database source into a shape consumable by the Grid but also made up of types that RIA Services support. Only at that point do I know how many columns and rows I'll need and what the column and row header text should.

It's a great job for an in-memory DataTable! So, unfortunately RIA Services disqualifies the good old reliable DataTable. And drat, an EF entity must have a mapping to a physical data store!

As far as I can tell, that leaves me with IList<T>. Any suggestions on the shape of T such that it is bindable to the Grid and I get change notification back in the middle tier? What if I packed the grid information in an Array and then unpacked it into a DataTable on the client?

I'm really tired of the endless examples of database objects that are perfectly structured to bind directly to a grid. And, no, POCO doesn't help either when you don't know the design time structure of the properties.

related questions