Solved

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

Posted on 2013-06-05
2
294 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 250 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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
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…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

707 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