R – Consuming Database Result Sets with Silverlight DataGrid

datagriddatatableessbasesilverlightxml

So I have a WCF Service that gets a result set from a database (not SQL) – I can get this data as a DataTable, string[][], etc.

I can't use LINQ or ADO.NET Entity Framework very easily as it's not coming from an SQL DB.

So my question is:

  • What's the best way to package this data for transmission across the wire? I can use any data structure supported in Silverlight.

  • What's a good way to consume it?

  • Is there any easy way to connect it to a DataGrid?

Best Answer

  1. You should package data into service entities that are exposed by your WCF Service.

  2. WCF basic HTTP binding in SL2, in SL3 you have many more options

  3. <DataGrid ItemsSource="{Binding MyCollectionOfObjects}" />

Related Topic