On Jun 8, 2006, at 10:38 AM, Henning Hraban Ramm wrote:
- how do I get a foreign key selection (dropdown list with entries
from another table)
First, create a method in your bizobj to get the available choices
and their keys. Then create your list with the following properties:
DataSource = <bizobj's DataSource>
DataField = <name of the FK field in your table>
ValueMode = "Key"
Choices = <list of values (without keys) that should appear in the list>
Keys = <list of keys for the Choices values>
Note that the lists for 'Choices' and 'Keys' should be in the same
order, so that the first element of Keys is the key for the first
element of Choices, and the second element of Keys... etc.
Now when you navigate to a record, the FK value in the DataField of
that record will cause the list control to show the corresponding
name. If the user selects a different item from the list, the FK will
be updated with the new choice's key.
-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users