hi friends
i have a datagridview in my form . it has a datatable as a datasource named "dt". after any changes :
if i put getChanges function in a button click event getchanges function return nothing
but in the formClosing event it return any change as a datatable
look this commands :
the Changes has nothing
the changes has all changes.
why in the button click event return nothing?
i have a datagridview in my form . it has a datatable as a datasource named "dt". after any changes :
if i put getChanges function in a button click event getchanges function return nothing
but in the formClosing event it return any change as a datatable
look this commands :
VB.NET:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim [COLOR=#ff0000]Changes[/COLOR] As DataTable = dt.GetChanges
End Sub
VB.NET:
Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
Dim [COLOR=#ff0000]Changes[/COLOR] As DataTable = dt.GetChanges
End Sub
why in the button click event return nothing?