C# - Saving a DataGridView to file and loading

Posted by Rekar on Stack Overflow See other posts from Stack Overflow or by Rekar
Published on 2010-06-01T18:14:39Z Indexed on 2010/06/01 18:33 UTC
Read the original article Hit count: 139

Filed under:
|

Hello,

To start off, what I have is a simple Winforms app, with just a save and load button, and with a datagridview control to hold data. What I am looking to do is input some data into the control, hit the save button, and it save all the data to a file locally on the computer, and when I hit load, it loads the file and populates the control appropriately, keeping all rows, columns, and data the same as when saved.

Although it sounds fairly simple to me, I cant seem to figure a good way to save and load the data. Can I get a few pointers or examples to get myself started?

Thank you.

© Stack Overflow or respective owner

Related posts about c#

Related posts about datagridview