Results 1 to 8 of 8

Thread: Saving Progress in an Application

  1. #1

    Thread Starter
    New Member Mr_Munkey's Avatar
    Join Date
    May 2003
    Posts
    8

    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.

  2. #2
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    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.

  3. #3

    Thread Starter
    New Member Mr_Munkey's Avatar
    Join Date
    May 2003
    Posts
    8
    Thanks for the thought that I've had that much experience. I looked into a datagrid before, but I didn't quite get it. Maybe I'll look into that some more. that would definilty make my life easier with saving

    By the way, if anyone happens to have a link to a good tutorial on datagrids that would be great too

    (I've actually been programming for less than a year, but I've learned quickly )

  4. #4
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    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

  5. #5

    Thread Starter
    New Member Mr_Munkey's Avatar
    Join Date
    May 2003
    Posts
    8
    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.

  6. #6

    Thread Starter
    New Member Mr_Munkey's Avatar
    Join Date
    May 2003
    Posts
    8
    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

  7. #7
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256
    If you dont want that +, then just bind the table directly like this

    dataGrid.DataSource = myDataSet.Tables(0)

  8. #8

    Thread Starter
    New Member Mr_Munkey's Avatar
    Join Date
    May 2003
    Posts
    8
    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
  •  



Click Here to Expand Forum to Full Width