Hi
I have a winform db app that uses the following code to bind data source to
the form fields;
Private ds As MyDataSet
Dim db As System.Windows. Forms.Binding
Private WithEvents bmCompanyDetail s As
System.Windows. Forms.CurrencyM anager
db = New System.Windows. Forms.Binding(" Text", ds.tblClients, "ID")
txtID.DataBindi ngs.Add(db)
db = New System.Windows. Forms.Binding(" Text", ds.tblClients,
"Company")
txtCompany.Data Bindings.Add(db )
'...more field bindings
bmCompanyDetail s = CType(BindingCo ntext(ds, "tblClients "),
CurrencyManager )
EndWait()
When the user edits some fields and presses Save, following code is
executed;
Dim Row As DataRow
bmCompanyDetail s.EndCurrentEdi t()
Row = DirectCast(bmCo mpanyDetails.Cu rrent, DataRowView).Ro w
If Row.RowState = DataRowState.Mo dified Then
' Update here
End IF
Problem is that despite the fact data is changed in bound fields,
Row.RowState returns Unchanged state. What is the problem and how can I fix
it?
Thanks
Regards
I have a winform db app that uses the following code to bind data source to
the form fields;
Private ds As MyDataSet
Dim db As System.Windows. Forms.Binding
Private WithEvents bmCompanyDetail s As
System.Windows. Forms.CurrencyM anager
db = New System.Windows. Forms.Binding(" Text", ds.tblClients, "ID")
txtID.DataBindi ngs.Add(db)
db = New System.Windows. Forms.Binding(" Text", ds.tblClients,
"Company")
txtCompany.Data Bindings.Add(db )
'...more field bindings
bmCompanyDetail s = CType(BindingCo ntext(ds, "tblClients "),
CurrencyManager )
EndWait()
When the user edits some fields and presses Save, following code is
executed;
Dim Row As DataRow
bmCompanyDetail s.EndCurrentEdi t()
Row = DirectCast(bmCo mpanyDetails.Cu rrent, DataRowView).Ro w
If Row.RowState = DataRowState.Mo dified Then
' Update here
End IF
Problem is that despite the fact data is changed in bound fields,
Row.RowState returns Unchanged state. What is the problem and how can I fix
it?
Thanks
Regards
Comment