|
-
Jun 29th, 2004, 02:10 AM
#1
Thread Starter
Lively Member
calling helpful programmers! i need your help please!
well, i have posted about saving a form with master/detail relationship...unfortunately nobody responded and now I just want to ask how can i save the details of an unbound datagrid to a database table? please I need your answers on this...I'm counting on you guys! thanks a lot!
-
Jun 29th, 2004, 06:09 AM
#2
Junior Member
Use collections
You can do that by making a pseudo table at your end and then in turn update the changes in the grid. By pseudo table I mean define a whole table at your end.
In case you do not want to use it .You can try various collections provided by .net.
Store that data of unbound grid in the Data table made by you and then save it in the database.
Give me a place to stand and I will move the Earth 
-
Jun 29th, 2004, 06:32 AM
#3
Hyperactive Member
How does the data get into your datagrid?
Do you populate it manually from user entries or by retrieving data from a table and then dropping your connection?
If you are populating the datagrid from user entries, try creating a table in your form and set it as the datasource for your grid. Then for each entry that you want to add to the grid, create a new datarow and add it to the table and refresh your grid.
There are a few ways to get your data back to the database. The first is by using a dataset and adding your datatable to it. Then associate an insert and/or update command object with your dataset. Finally you want to ensure you have a connection object associated with your dataset so that you can call the update method associated with your dataadapter.
I don't know your level of experience with ADO.NET so I'm making a lot of assumptions here that you know each of these objects and their purpose. If you need additional assistance, just ask, and I'll try to help you as much as I can.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|