Updating dataset with parent and child temp-tables from boun

Posted by Tung on 05-May-2011 06:37

Hi

Previously I've used datasets with just one temp-table and they were updated with the current values from bound controls using the Assign () method on the pro binding source.

Now I'm trying to use a dataset with one parent and three child temp-tables. I've got my data and I can bind controls to the child tables manually with code like "teSupplier:DataBindings:Add("Value",  bsCharges, "ttRecCost.supplier", TRUE)". But the Assign method is only updating the parent temp-table.

Looking at the forums, I tried "teSupplierName:DataBindings["Value"]:WriteValue()" in the text editor's ValueChanged event but it didn't work. Neither did setting AutoUpdate to true on the binding source.

I seem to be struggling when it shouldn't be this hard.

Can anyone help?

Thanks

Tung

All Replies

Posted by Tung on 05-May-2011 08:40

Arrgh, it should've been the TextChanged event.

Even so, it doesn't look like Architect can handle binding sources with child tables because the Assign method should work for any bound control, not just those bound to the top-level tables.

Posted by Tung on 05-May-2011 10:31

I made a mistake. WriteValue works only for the parent table, not child tables.

I tried DataBindings["Text"] with TextChanged and DataBindings["Value"] with ValueChanged on an ultratexteditor and neither worked.

I'm going to do it all manually.

Posted by Admin on 05-May-2011 10:35

Unless you need to use update in a multi-band Grid I would highly recommend working with multiple ProBindingSources anyway. Each attached to one of the Queries of the Dataset (TOP-NAV-QUERY, DATA-RELATION Query).

Posted by Tung on 10-May-2011 11:07

Hi Mike

I did read your post, I was busy getting it to work which it does, so thanks!

The next step is getting our CRUD panel user control to handle more than one binding source.

This thread is closed