473,408 Members | 2,477 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,408 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 2726
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.