Update dataview/dataset

Moishe

Member
Joined
May 30, 2003
Messages
24
Hi All
Does any one know how to update dataview and/or dataset by just typing inside the fields. It should work just like MS Excel which save data automatically in the "some windows databese" when going to another cell

Im using vb.net
and dataadapter.update(dataset)
dataset.acceptchanges()
but it only works when I press the save button and press enter to go the other row and last row cannot update by pressing enter and then save button
I want to work without pressing the save button
Thanks
 
try with this code:

Code:
Private Sub DataGrid1_CurrentCellChanged(ByVal sender As 
Object, ByVal e As System.EventArgs) Handles DataGrid1.CurrentCellChanged
         Me.BindingContext(_DataTable).EndCurrentEdit()
        adap.Update(_DataTable)
        _DataTable.AcceptChanges()
    End Sub

use some counter i you wish update after last column!!

:D
 
Creating table with date and time

Thanks for your reply.
How do I set that anything in the dataview was changed than update what ever being changed
Thanks for your help
 
Back
Top