what codes will be used in adding records (btn_Add) from
1. txtProduct 2. txtQuantity 3. txtPrice
to the Data Grid View without saving it on the database.
meaning, you can able to view what have you added once, but haven't saved it yet.
I established a table in the sql with the ff. field names:
1. ProductName nvarchar(50) 2. Quantity nvarchar(50) 3. Price nvarchar(50)
you could have the access to get the contents from the data grid view.
Bechir BejaouiPosted Mar 25, 2008, 8:32 AM
- create a dataset then a datatable within it
- Fill the datatable from the database with dataAdapter
- set the datasource to your dataset an datamemeber to datatable.tablename
- Don't use The update method of the dataAdapter to save data back in the data base
with this manner you have two diffrement views one in the datagrid and the other in the database