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

  • Thread starter Thread starter JeffGoneMad
  • Start date Start date
J

JeffGoneMad

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
 
JeffGoneMad said:
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top