Partial ProBindingSouce Assign when values in "nested&q

Posted by nborshukov on 05-Feb-2020 12:22

Hi all!

I have dot Net form with four combo-boxes populated from dataset with parent-child tables.

Values of all four combo-boxes are bound to table in another dataset using ProBindingSource.

When value is chosen in topmost combo-box, all child combo-boxes lists are populated and "first" items are displayed. At this moment, Assign method on ProBindingSource, the combo-box values are bound to, assign value only for topmost combo-box, but not the others.

Am I missing something?

Please find attached code to reproduce the issue.  

[View:/cfs-file/__key/communityserver-discussions-components-files/19/cb3.rar:32:32]

Tested on 11.5.1 and 11.7, Windows 10 Pro   

     

Posted by nborshukov on 06-Feb-2020 09:30

Hi Laura!

Thank you for the quick response.

I solve the issue for me, changing Data Source Update Mode for all combo-boxes from "OnValidation" to "OnPropertyChanged" .

Just for the record, to do so:

1. Open form in the designer;

2. Select the combo-box;

3. In Properties pane, select Properties tab, expand (DataBindings), click "..." button on (Advanced) row and Formatting and Advanced Binding dialog is opened;

4. Select bound property in Property tree and in Data Source Update Mode combo-box change to "OnPropertyChanged".  

Now everything works for me as expected.

All Replies

Posted by Laura Stern on 05-Feb-2020 14:51

When Assign() is called, we only do the assignment operation if we think that the value of the field has been modified.  I'm guessing that it does not think the field has been modified.  But it is hard to know if that's correct because I'm not clear on the set up.  If you change the value for the top combo box, that would change the value of the bound field in the current top-level buffer.  That should not modify which children are shown, since we are still looking at the same top-level record.  In any case, if the field from a different child is shown, the bound field of that child has NOT in fact been modified.  It is just newly showing up on the screen.

It would help me if you could give a more specific example.  You can narrow it down to just 2 or 3 of the combos for simplicity and tell me what table/field is being displayed in each.  And also say what value is currently in the child field and what you expect to be there after the ASSIGN happens.

Posted by nborshukov on 06-Feb-2020 09:30

Hi Laura!

Thank you for the quick response.

I solve the issue for me, changing Data Source Update Mode for all combo-boxes from "OnValidation" to "OnPropertyChanged" .

Just for the record, to do so:

1. Open form in the designer;

2. Select the combo-box;

3. In Properties pane, select Properties tab, expand (DataBindings), click "..." button on (Advanced) row and Formatting and Advanced Binding dialog is opened;

4. Select bound property in Property tree and in Data Source Update Mode combo-box change to "OnPropertyChanged".  

Now everything works for me as expected.

This thread is closed