?
Solved

Save and then re-load a dataset to/from XML file

Posted on 2013-06-05
2
Medium Priority
?
299 Views
Last Modified: 2013-06-12
Experts,

I have a Series of Properties created for a DataGridView generator I wrote some time back.  It works well and now I was thinking of adding the ability to write the structure to an XML file and then read it back in.

I have the following sets of Public Properties I want to store:
strVarStructure
strVarLayout
strVarProperties
strVarSettings

The strVarProperties and strVarSettings relate to DataGridView fields so there can be several of these as Public Property arrays.

I don't want to store the actual DataGridView data, but the basic structure of the DataGridView and its properties including all field properties.  This ability would allow me to setup a Default view and allow the user to change fields being displayed as needed with options.

With XML there is ReadXML and WriteXML.

Can I create a dataset including the above Public Properties and write that using the statements above which relate to the dataset?

OR do I need to write some additional code to create the dataset structure I want to write and then read back in?

Thank you for your assistance.
0
Comment
Question by:Peter Allen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 1000 total points
ID: 39239546
You will need to define the datatable structure with columns. Then populate the datatable with property values and write to xml file.
0
 

Author Closing Comment

by:Peter Allen
ID: 39242248
Got it!  Thanks!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question