473,321 Members | 1,748 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

How to save data in unbound datagridview in vb.net

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.

Thanks.
Plz help
Oct 23 '14 #1
3 2723
twinnyfo
3,653 Expert Mod 2GB
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
Frinavale
9,735 Expert Mod 8TB
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.

-Frinny
Oct 27 '14 #3
iam_clint
1,208 Expert 1GB
to add on to what Frinavale has said you can also use http://www.sqlite.org/ 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

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

Similar topics

0
by: MethMath | last post by:
I have an unbound DataGridView which I programatically feed new rows. As I want to maintain possibility for user to add additional rows manually I maintain AllowUserToAddRows=True, but when a row...
1
by: michaeleaton | last post by:
Evening. I have an unbound dataGridView which i'm populating programatically (not using a dataset) from xml/user entered data. What i now need to do is when the user clicks save i want it to write...
1
by: kevinlkingma | last post by:
Hi All: Can someone tell me how to programatically move to a specific row in an unbound datagridview control (and move the cursor on to that row)? Kevin
2
by: Richard Lewis Haggard | last post by:
How can an object be associated with an unbound DataGridView row? I want to be able to always get from a row to an object and from an object to a row but it is not obvious to me how such an...
2
by: =?Utf-8?B?QnJhZA==?= | last post by:
ok, vs2005 and vb.net i have an unbound datagridview control i am programatically adding data to it the DataGridView.Rows.Add() function does not always add rows to the end of the grid...
4
by: Anthoni | last post by:
Dear All, I need to export data of unbound datagridview to XML file. Since my DataSource is NULL, What other options do I have? Does i need to make 2 loops (on all the records and inside loop of...
14
by: wassssup | last post by:
hi guys..im new to datagridview and im wondering is there a way to convert an encrypted data in access and show it in a datagridview? im using C# and microsoft access normally this is how to show...
6
by: Unter | last post by:
VB.2005 - Please help - I've been trying for days to find some simple code samples to programatically add and remove data from an unbound Datagridview. I only have 3 coloums of 3 rows and there...
0
by: Ed Bitzer | last post by:
Appreciate some direction on populating an unbound DataGridView with an one dimensional array of date an appointments (a calendar) read from a coma delimited text file. My original approach was to...
0
by: M1kkelZU | last post by:
Hey guys, I've been playing with this for a few days now and just can't seem to get it working. I'll explain what I have to do: Open a file and read it in to the datagridview (done) Save data...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.