2
Answers

How to update or rewrite xml file according to changes in DataGridView

Memento

Memento

12y
1.7k
1
C# winforms
I filled my DataGridView (dgv01) with xml nodes, like that:
foreach (XmlNode node1 in node.ChildNodes)
{
   if (node1.Name == "abc")
   {
      dgv01.Rows.Add(node1.InnerText, node1.ChildNodes[0].InnerText, node1.ChildNodes[1].InnerText);

Then I made some changes on dgv - add-delete rows, change content etc.
Is there a way to update or completely rewrite my xml file according to changes in dgv.
Thanks in advance.

Answers (2)