[Gambas-user] How to share one datasource across two forms?
Benoît Minisini
gambas at ...1...
Thu Aug 15 16:51:53 CEST 2013
Le 11/08/2013 21:27, Marty a écrit :
> Hello,
>
> First let me say thank you to all those who have answered my past posts.
>
> As I get deeper into programming databases with Gambas, more questions
> come out. I have two forms which show data from the same table. The data
> is split up so that the user interface is less confusing. My first
> question is how can I show the data on form 2 when the datasource is on
> form 1?
You can't share a DataSource between two different forms, because
DataSource is also a control container.
But, technically, I could have add a way to specify the DataSource of a
control explicitely...
>
> I'd like to use a datacombo box to provide input to a field but, get the
> list from another table. Is this possible?
DataCombo takes its contents from another table, provided that it shares
a common primary key with the main table.
See the documentation of DataCombo.Table, DataCombo.Field and
DataCombo.Display.
>
> One more. I also need a data aware checkbox. I want to save the logical
> value of the checkbox to the datasource. Any suggestions?
You must implement it by hand at the moment. I didn't implement
"DataCheckBox", because a database boolean field actually understands
three value: True, False and Null. Maybe I could use the Tristate
property... I will think about it.
Regards,
--
Benoît Minisini
More information about the User
mailing list