Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Save DataGridView Control to my.settings

Status
Not open for further replies.

shaiss

IS-IT--Management
Mar 26, 2004
16
0
0
US
I have a DataGridView Control that looks like this

_________________
Name1 |Name2|
_________________
JOE |JOE |
_________________
SHAI |SHAI |
_________________
STEVE |STEVE|
_________________
STEVE |STEVE|
_________________

I have a button called "save"

What I want:
When the user clicks the save button the data from the DataGridView gets saved into a my.settings value so that I can call it at a later time when the user renters this form or on another form.

Question:
What variable type should the my.settings variable be?
How would you commit the DataGridView data to this variable in code?
How would you call this variable to fill another DataGridView

Thank you everyone for your help!
 
I don't think it is a good idea to save a whole datagridview data to registry if it is large. Better go for an xml/database file. If the data being used only for the current session then save into a dataset/datatable for re-use.

If you are still require to do the registry settings the google for "SaveSettings/Getsettings + vb.net"

Zameer Abdulla
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top