I'm trying to check if Dataset which I use to populate data in my form
has changes with DataSet.HasChanges method but it is always returning
true, no matter if I did something in form or not. I tried to search
groups and whole net but I couldn't solve this problem. Also, I tried
to research my form and I figured out that problem could be dropdown
which I have on the form and which is bounded to table field. When i
put ValueMember of dropdown to None then there is no this HasChanges
problem. Does anyone has some solution for this?
This is code which I use to check if dataset has been changed:
Private Sub Partneri_FormClosing(ByVal sender As Object, ByVal e As
System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
Me.Validate()
Me.Partneri_BindingSource.EndEdit()
If Me.PartneriDS.HasChanges = True Then
If MsgBox("Save changes?", MsgBoxStyle.Question +
MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
Me.Partneri_TableAdapter.Update
(Me.PartneriDS.Sifarnik_Partneri)
Me.PartneriDS.AcceptChanges()
End If
End If
End Sub