Emma Emma

Emma Emma

  • 2k
  • 101
  • 50.7k

Open button, XML to datagridview

May 2 2013 2:22 AM
Hi,
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 =

openFile.ShowDialog();

xmldata.DataSet.ReadXml(" .xml")

dataGridView1.DataSource = xmldata.DataSet;

dataGridView1.DataMember="ID"


whi it does not show anything...thanks




Answers (2)