Binding XML File to Data Grid in Silverlight - Online Free Computer Tutorials.

'Software Development, Games Development, Mobile Development, iOS Development, Android Development, Window Phone Development. Dot Net, Window Services,WCF Services, Web Services, MVC, MySQL, SQL Server and Oracle Tutorials, Articles and their Resources

Tuesday, October 4, 2011

Binding XML File to Data Grid in Silverlight

It is a common scenario when we need to bind or display data from XML File to Silverlight Data Grid. In this article, I have tried to demonstrate this with simple steps. What all we are going to do is

1. Download content of XML file as string using WebClient class.

2. Parse XML file using LINQ to XML

3. Bind parsed result as item source of Data Grid.

Prepare Data Source

Put your XML File in ClientBin folder. You can put XML file at any server location but in that case you will have to provide absolute URI of the XML file while downloading or reading XML file.

I have created a sample Data.xml file

Read More....

No comments:

Post a Comment