Question Populate ds using ReadXml, inserts out of order using WriteXml

vbsemipro

New member
Joined
Nov 9, 2008
Messages
4
Location
Birmingham
Programming Experience
10+
I'm populating a dataset using ReadXml method (no SQL dataset). The dataset is used to pupulate a datagrid, and after adding a new entry in the datagrid, this entry is inserted in the dataset in a particular sequence. Upon closing the application, the dataset is then written to a file using WriteXml resulting in the newly added item appearing at the end of the row positions for the correct table. My question is: why does the WriteXml method create this row in the last position?

Thanks for any help.
 
Last edited:
This from the msdn library

XmlAttributeCollection.Append Method
Inserts the specified attribute as the last node in the collection.
XmlAttributeCollection.Append Method (System.Xml)

XmlAttributeCollection.InsertAfter Method
Inserts the specified attribute immediately after the specified reference attribute.
XmlAttributeCollection.InsertAfter Method (System.Xml)

XmlAttributeCollection.InsertBefore Method
Inserts the specified attribute immediately before the specified reference attribute.
XmlAttributeCollection.InsertBefore Method (System.Xml)



I hope this does you some good getting my app to write the xml has been giving me the blues for days
 
Last edited:
Back
Top