2
Answers

Open button, XML to datagridview

Photo of Emma Emma

Emma Emma

12y
1.6k
1
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)