Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27449

VS 2010 porblem with DataTable.GetChanges function

$
0
0
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 :
Code:

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
  Dim Changes As DataTable = dt.GetChanges
End Sub

the Changes has nothing

Code:

Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
  Dim Changes As DataTable = dt.GetChanges
End Sub

the changes has all changes.

why in the button click event return nothing?

Viewing all articles
Browse latest Browse all 27449

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>