Hi all,
I have two combos in a Grid.
The first combo named cmbGroup contains data from a table called GROUP.
cmbGroup is bound to tablecolumn DATA.grp_nr
The second combo named cmbSubgroup contains data from a table called SUBGROUP.
cmbSubgroup is bound to tablecolumn DATA.sgp_nr
Table GROUP has fields NR, NAME
example: Cars, PC
Table SUBGROUP has fields NR, NAME, GRP_NR
example for group Cars: BMW, Mercedes
example for group PC:IBM, DELL, HP
I use for each combo .rowSourceType = 3 (=SQL statament)
cmbGroup.rowSource='select name,nr from group order by name'
cmbSubgroup.rowSource='select name,nr from subgroup where grp_nr=data.grp_nr order by name'
cmbGroup.interAciveChange: cmbSubgroup.requery()
So I see only those SUBGROUP which belongs to GROUP
Imagine there are 2 rows in the Grid
The first row contains GROUP=Cars, SUBGROUP=Mercedes
The second row contains GROUP=PC, SUBGROUP=DELL
The problem:
Navigating between the 2 rows will only show me the SUBGROUP for the focused row. The other row(s) will show me nothing. I think this is because dependency between GROUP and SUBGROUP.
The question:
How can I manage that cmbSubgroup will show me contents for all the rows.
Thanks for any reply.
André
I have two combos in a Grid.
The first combo named cmbGroup contains data from a table called GROUP.
cmbGroup is bound to tablecolumn DATA.grp_nr
The second combo named cmbSubgroup contains data from a table called SUBGROUP.
cmbSubgroup is bound to tablecolumn DATA.sgp_nr
Table GROUP has fields NR, NAME
example: Cars, PC
Table SUBGROUP has fields NR, NAME, GRP_NR
example for group Cars: BMW, Mercedes
example for group PC:IBM, DELL, HP
I use for each combo .rowSourceType = 3 (=SQL statament)
cmbGroup.rowSource='select name,nr from group order by name'
cmbSubgroup.rowSource='select name,nr from subgroup where grp_nr=data.grp_nr order by name'
cmbGroup.interAciveChange: cmbSubgroup.requery()
So I see only those SUBGROUP which belongs to GROUP
Imagine there are 2 rows in the Grid
The first row contains GROUP=Cars, SUBGROUP=Mercedes
The second row contains GROUP=PC, SUBGROUP=DELL
The problem:
Navigating between the 2 rows will only show me the SUBGROUP for the focused row. The other row(s) will show me nothing. I think this is because dependency between GROUP and SUBGROUP.
The question:
How can I manage that cmbSubgroup will show me contents for all the rows.
Thanks for any reply.
André