Consuming "Data Tables" in Silverlight

Since silverlight doesn't have support for DataSets / DataTables, what would be the best approach if I wanted to use a data table from a database?

A bit like this: user action in silverlight -> fetch data from server -> display in GridView

The thing is, I DO NOT know how many and which columns will have data ...

Is it possible to bind the DataGrid to some kind of freeform XML generated on the server, or will I have to parse the data returned by the web service in a different format or ...?

0


source to share


1 answer


One approach that works for me is the following, which I just found: http://blog.bodurov.com/How-to-bind-Silverlight-DataGrid-from-IEnumerable-of-IDictionary



By absorbing the XML file and putting the data into dictionary list objects (list is records and dictionary in list is list of value fields), I can use the method in the above URL to create objects dynamically. With these objects, I can populate the GridView.

0


source







All Articles