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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DataSet/DataGridView question

Status
Not open for further replies.

shannanl

IS-IT--Management
Apr 24, 2003
1,071
US
I would like to make a small shopping list type program and use a data grid view. I would like for the user to see the available items in the grid and have a column next to the item where they can enter the quantity they want and then submit it back to the database. I can populate the data grid view but do not know how to push the changes back to the database. In addition, I only want rows that have a quantity of > 0 to push back to the database. Can anyone get me started on this?

Thanks in advance for the help.

Shannan
 
How are you binding the dataset, programmatically such as
Datagridview1.datasource=
Or have you place the grid on your form and used the datasource wizard to bind it?
 
I am doing this programmatically, setting the datasource.

Thanks,

Shannan
 
You will need to set your updatecommand in your data/table adapter. The following help article will explain it more

ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.VisualStudio.v80.en/WD_ADONET/html/f21e6aba-b76d-46ad-a83e-2ad8e0af1e12.htm
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top