Advertisement

04.23.2008 at 01:16AM PDT, ID: 23345702
[x]
Attachment Details

Problem detecting changes on a parent-child bindingsource

Asked by slluch in Microsoft Visual Basic.Net

Tags: microsoft, visual studio, 2005

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.DataSource = dsDetalleArticulo

Me.BindingSource1.DataMember = "TARTICULOS"

'child bindingsource
bsArticulosClientes.DataSource = Me.BindingSource1
bsArticulosClientes.DataMember = "ArticulosClientes"

 
Code to check for changes:

bsArticulosClientes.EndEdit()' 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.HasChanges Then

......

end if

Any ideas?

 

Thank you
Start Free Trial
[+][-]04.23.2008 at 02:30PM PDT, ID: 21425630

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.23.2008 at 11:28PM PDT, ID: 21428151

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.24.2008 at 07:24AM PDT, ID: 21431162

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.24.2008 at 08:02AM PDT, ID: 21431645

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.24.2008 at 08:10AM PDT, ID: 21431734

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Microsoft Visual Basic.Net
Tags: microsoft, visual studio, 2005
Sign Up Now!
Solution Provided By: slluch
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628