Emma Emma

Emma Emma

  • 2k
  • 101
  • 50.7k

Open button, XML to datagridview

May 2 2013 2:22 AM
How can I make a program for a button, which when I press it will show a direcoty to choose which .xml file I want to load. Then display the information to datagridview....Thanks a lot.
I made a funciton like this :

dataGridView1.AutoGenerateColumns = true

true;XmlDataDocument xmldata = new XmlDataDocument();// choose the open file

openFile.Filter =

openFile.InitialDirectory =


xmldata.DataSet.ReadXml(" .xml")

dataGridView1.DataSource = xmldata.DataSet;


whi it does not show anything...thanks

Answers (2)