|
-
May 28th, 2003, 11:38 PM
#1
Thread Starter
New Member
Saving Progress in an Application
I'm currently working on an app that will act something like a checkbok register/balancing program. I've been experimenting with the saveFileDialog box, and I've figured out how to save info from one object in the form like a picturebox or textbox. I've also searched through all the info about saveFileDialogs on this forum, and I have this question.
How would I go about saving the information input by the user in a simple way?
I only know about saving information from one object, so the only way I could think of doing this (I'm creating a spreadsheet look with arrays of text boxes) is by creating several loops to save the information from the text boxes.
Any help would greatly be appreciated
Last edited by Mr_Munkey; May 28th, 2003 at 11:43 PM.
-
May 28th, 2003, 11:51 PM
#2
PowerPoster
Maybe use a datagrid control, and databind it to a dataset. Then you can save the dataset as an xml file easily along with reading the xml file back into the dataset real easy.
-
May 28th, 2003, 11:54 PM
#3
Thread Starter
New Member
-
May 29th, 2003, 12:09 AM
#4
PowerPoster
All you need to do is create a dataset:
Dim ds As DataSet = New DataSet()
Then populate the dataset with the xml file:
ds.ReadXML("YourXMLFile.xml")
Then bind the dataset to the datagrid:
datagrid1.DataSource = ds
-
May 29th, 2003, 12:28 AM
#5
Thread Starter
New Member
If only everyone could explain things as well as you, then the whole world would know .NET by now 
Thanks a bunch. I'll fiddle with it some tomorrow after work.
-
May 29th, 2003, 03:27 PM
#6
Thread Starter
New Member
Well, I was able to do some research at work (still there) I've been able to get it working, but when the program loads up, I have to click a + symbol to get to what I titled "body" click on the link to the body.xml file and then it will display the spreadsheet/datagrid.
How would I set it up so that the spreadsheet shows up right away?
Thanks so much for all the help. I've been learning quite a bit
-
May 29th, 2003, 04:02 PM
#7
Frenzied Member
If you dont want that +, then just bind the table directly like this
dataGrid.DataSource = myDataSet.Tables(0)
-
May 29th, 2003, 05:19 PM
#8
Thread Starter
New Member
Sweet 
Thanks soo much.
Now the last question I have, what file extention should I save the datagrid as? XML? also, is there a way to do hidden fields (I can look that one up when I get back from work if nobody answers that one )
Thanks again everyone!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|