Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2013-06-05
2
Medium Priority
?
306 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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

598 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