Hi,
In addition to the other replies you can use the currencymanger
currentchanged event to be notified of data being changed.
Dim ds As New DataSet
Dim WithEvents cm As CurrencyManager
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim strConn As String
Dim strSQL As String
Dim da As OleDbDataAdapter
strConn = "Provider = Microsoft.Jet.OLEDB.4.0;"
strConn &= "Data Source = Northwind.mdb;"
conn = New OleDbConnection(strConn)
da = New OleDbDataAdapter("Select * From Categories", conn)
da.Fill(ds, "Categories")
DataGrid1.DataSource = ds.Tables("Categories")
cm = CType(Me.BindingContext(DataGrid1.DataSource), CurrencyManager)
End Sub
Private Sub cm_CurrentChanged(ByVal sender As Object, ByVal e As
System.EventArgs) Handles cm.CurrentChanged
MessageBox.Show("Item Changed")
End Sub
Ken
--------------------------------------
Hi,
How can I see if the Data is changed by the user in my DataGrid so I can ask
him to save the changes or not?
Thanks,
Pieter