473,396 Members | 1,738 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,396 software developers and data experts.

How do you save data from an unbound datagridview in VB?

Hi,

I'm kind of a newbie to VB, so I hope this doesn't seem too trivial. I
have a problem with the DataGridView control. I can find all kinds of
stuff about populating data in a DataGridView control, but I haven't
found a way to save the data on program exit. There must be a way,
after all, you can't expect people to re-input all the data every time
they use your program!

Any help is appreciated.

Jeff

Dec 14 '05 #1
2 7189
JeffGoneMad wrote:
Hi,

I'm kind of a newbie to VB, so I hope this doesn't seem too trivial. I
have a problem with the DataGridView control. I can find all kinds of
stuff about populating data in a DataGridView control, but I haven't
found a way to save the data on program exit. There must be a way,
after all, you can't expect people to re-input all the data every time
they use your program!

Any help is appreciated.

Jeff

Write the code to save the data to a file.

Tom

Dec 14 '05 #2
Jeff,

What is the datasource?

If it is a dataset, you can update that in the database or write it to a
disk using

ds.writeXML("mypath.xml")

I hope this helps,

Cor
Dec 14 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: deko | last post by:
I need to create different recordsets based on queries that use data from unbound fields in a form. I've discovered that I can't do this, and instead need to save the data in question (usually a...
2
by: Joe | last post by:
I have a form which displays data in 3 related tables. I want to give the user a prompt to save changes when any field has been modfied on the form. Is there a easy way to do this so the 1 or...
10
by: Henok Girma | last post by:
Hello Gurus, I want to save the state of an unbound DataGridView on my Windows Form application to an XML file so i can later load it back.. Basically, on my form I have a DataGridView, it's got...
7
by: Rainer Queck | last post by:
Hi NG, Why is it, that in my DataGridView all columns which are not bound to a "DataProperty" loos thier content in a couple of occasions? This happens if: - Underlaying...
6
by: alexia.bee | last post by:
Hi all, I am new to C# so please bear me :). I have an app which uses datagridview. it has 8 columns. I also have struct which has 8 members(the same as the datagridview). when I add row to...
3
by: Richard Lewis Haggard | last post by:
I have an unbound DataGridView control that has some cells that may contain more multi-line text than can be completely displayed in the available screen space. When the height of its row to...
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...
4
by: Christian | last post by:
Hi, how i can save the rows in a DataGridView in c# 2008? i haven't a DB but only datagridview...
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: 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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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.