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


Top 5 Contributors of the Month
david stephan

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.

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

Hi,
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
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

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