.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Pankaj Mishra
alex morco
Imran Ghani

Home >> Forum >> Windows Application >> Post New QuestionBookmark and Share Subscribe to Forum

Read XML File into DataGridview

Posted By: Ramesh     Posted Date: December 03, 2008    Points:2   Category :Windows Application
In my application i need to read XML file and display the content into DataGridview. Please tell me how to read XML file using C# windows application.

Any help would be appreciated.

Author: Rahul             
Posted Date: December 04, 2008     Points: 5   

The best way is read the xml file into DataSet like this

DataSet ds = new DataSet();
ds.ReadXML("XML File Path");

Now assign DataSetTables into your DataGridView like this

DataGridView1.DataSource = ds.Tables[0];

Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend