By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,720 Members | 2,095 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,720 IT Pros & Developers. It's quick & easy.

How to save data in unbound datagridview in

P: 3
Dear all,

I have three textbox's and their data is added in the DGV. I dont know how to save the data so that next time when I open the DVG the previous data is stored.

Please note I want all the data to be stored in the application its self.

Plz help
Oct 23 '14 #1
Share this Question
Share on Google+
3 Replies

Expert Mod 2.5K+
P: 3,283
The easiest way would be to create a small text file to save the information, but I know that is not your intent. As you know, many applications use additional files to store configuration settings.
Oct 27 '14 #2

Expert Mod 5K+
P: 9,731
Data loaded in memory is only available while the application is running. Once the application is closed, all of the data loaded will be unloaded and destroyed.

If you need to the data to be available after the application has closed you need to store it somewhere so that it can be re-loaded into memory the next time the application is started.

You could use a database to store the data. There are free ones available that you can use (like mySQL).

Or, if your application is relatively simple, you could write data into a file so that it can simply read the file the next time the application is opened to recreate the data you need.

If you are going to save data into a file, I recommend storing it in XML format because it works well with Object Oriented Programming.

Here is a link to the MSDN Documentation for the XmlSerilizer Class that is used to serialize objects into XML. Hers is another MSDN article on the topic of XML Serialization in the .NET Framework.

Oct 27 '14 #3

Expert 100+
P: 1,208
to add on to what Frinavale has said you can also use which is free, I have used it in several applications and it works quite well.

SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. SQLite is the most widely deployed SQL database engine in the world. The source code for SQLite is in the public domain.
Oct 28 '14 #4

Post your reply

Sign in to post your reply or Sign up for a free account.