Now What I'm trying to do is when user do the changes in the grid those changes should be reflected in the list (in object properties) and then it should be updated in the database.
Hi steve, In this scenario the edit operation depends on the bound object that in your case is Data Table/Data Set.
if I debug through code, the "cell(2,2).value" returns null value whereas the rest of them returns the value what i entered. no exit from the last cell, so the data from that cell was not committed. Data Row/Data Row View objects implement IEditable Object and when some data in Rad Grid View is changed, the internal Currency Manager calls End Edit of current item after the current position is changed to another row.If you want to apply your changes immediately, you can use following code snippet: Hi Drago, Thank you for writing.I can enter data in text boxes and save that to the object easy enough. Is there a reason you need to commit to the DB on each change as opposed to just saving to the local list? Maybe I could wipe the database once the Binding List has its values...? If i get a database with alot of rows, then thats alot of processing... But a row in datagridview or updating an existing row, does not seem to save back... I assumed since it is databound that i do not need to make any saving changes? You can then commit when the program exits or with a user-accessible save function, that way you can roll back the changes before you exit if you want to. A more effective solution to this problem is to attempt to reduce the number of UPDATE statements.Let us start with a simple table: UPDATE staff SET salary = 1200 WHERE name = ' Bob'; UPDATE staff SET salary = 1200 WHERE name = ' Jane'; UPDATE staff SET salary = 1200 WHERE name = ' Frank'; UPDATE staff SET salary = 1200 WHERE name = ' Susan'; UPDATE staff SET salary = 1200 WHERE name = ' John'; UPDATE staff SET salary = 1200 WHERE name = ' Bob'; UPDATE staff SET salary = 1250 WHERE name = ' Jane'; UPDATE staff SET salary = 1200 WHERE name = ' Frank'; UPDATE staff SET salary = 1250 WHERE name = ' Susan'; UPDATE staff SET salary = 1200 WHERE name = ' John'; We are no longer setting all the salary fields to the same value, so we can’t collapse it into a single statement. Update(ds, "trial1") Msg Box("Records Updated= " & i) Catch ex As Exception Msg Box(ex. "Dynamic SQL generation for the Update Command is not supported against a Selec Command that does not return any key column information" thanks for your efficient, straightforward solution to updating user input to a datagridview in VB. NET and had spent several hours trying to find code for what I had thought should be a simple procedure - I was ready to give up; thanks again - Hi, im new for OLEDB.4.0; Data Source=D:\OFC\aadata\wms1.mdb") it showing error, A first chance exception of type 'System. Data Member = "trial1" End Sub Private Sub Button1_Click(By Val sender As System. Odbc Command Builder(adp) Dim i As Integer Try i = adp. Was thinking of doing it this way, Yeah, in the object i have a . hey frnds, Firstly I pick the records from the databse into the Data Grid View, Then I want that If we made changes to the records in the Grid View & Click on Update Button, Changes are Reflected into the Datbase .