Hi!. I have a problem with bindingsource endEdit method. I have a bindingsource binded to a table from a dataset. I have another bindingsource binded to a relation from the first bindingsource (parent-child relation). I have a form with several textboxes binded to the first bindingsource (parent) and some textboxes binded to the second bindingsource (child). My problem is that when i call EndEdit method on the first bindingsource, the underlying dataset detect changes but if I call EndEdit method on the second...the dataset.HasChanges method returns false unless i move to another record through a binding navigator. I want to detect changes on the child fields without canging record position.
Code :
'parent bindingource
Me.BindingSource1.DataSour
ce = dsDetalleArticulo
Me.BindingSource1.DataMemb
er = "TARTICULOS"
'child bindingsource
bsArticulosClientes.DataSo
urce = Me.BindingSource1
bsArticulosClientes.DataMe
mber = "ArticulosClientes"
Code to check for changes:
bsArticulosClientes.EndEdi
t()' at this point RowState=unchanged.
Me.BindingSource1.EndEdit(
)
'the following line only returns true when the changes affect textboxes binded to the parent bindingsource
If dsDetalleArticulo.HasChang
es Then
......
end if
Any ideas?
Thank you
Start Free Trial