I have three tables similar to these ones:
DISTRIBUTION:
id
le_id
amount
LE:
id
nlro_id
NLRO:
id
le
DISTRIBUTION.le_id has foreign key relationship to LE.id
LE.nlro_id has foreign key relationship to NLRO.id
What I want to do with this is have a Grid display the NLRO.le and the DISTRIBUTION.amount. That's really all I need to display.
So I guess a statement such as this one would do the job:
SELECT NLRO.le, DISTRIBUTION.amount
FROM DISTRIBUTION
INNER JOIN LE
ON DISTRIBUTION.le_id = LE.id
INNER JOIN NLRO
ON LE.nlro_id = NLRO.id
This Grid should have some Edit button. If I use the built-in edit mode, it would show me "le" and "amount" as editable text fields.
But I want "le" to be a drop-down-list showing all "NLRO.le" items (their key is LE.id):
SELECT LE.id, NLRO.le
FROM LE
INNER JOIN NLRO
WHERE LE.nlro_id = NLRO.id
How do I do that? I found no way to define the way the edit pane looks like. And even if I can define that: how do I make sure that clicking the "save/update"-buttons will save the right stuff in DISTRIBUTION? (like the le_id instead of the nlro.le which is the text of the drop-down list?)
Thanks
s.
DISTRIBUTION:
id
le_id
amount
LE:
id
nlro_id
NLRO:
id
le
DISTRIBUTION.le_id has foreign key relationship to LE.id
LE.nlro_id has foreign key relationship to NLRO.id
What I want to do with this is have a Grid display the NLRO.le and the DISTRIBUTION.amount. That's really all I need to display.
So I guess a statement such as this one would do the job:
SELECT NLRO.le, DISTRIBUTION.amount
FROM DISTRIBUTION
INNER JOIN LE
ON DISTRIBUTION.le_id = LE.id
INNER JOIN NLRO
ON LE.nlro_id = NLRO.id
This Grid should have some Edit button. If I use the built-in edit mode, it would show me "le" and "amount" as editable text fields.
But I want "le" to be a drop-down-list showing all "NLRO.le" items (their key is LE.id):
SELECT LE.id, NLRO.le
FROM LE
INNER JOIN NLRO
WHERE LE.nlro_id = NLRO.id
How do I do that? I found no way to define the way the edit pane looks like. And even if I can define that: how do I make sure that clicking the "save/update"-buttons will save the right stuff in DISTRIBUTION? (like the le_id instead of the nlro.le which is the text of the drop-down list?)
Thanks
s.