G
Guest
Hi NG!
Is there any way to have a ComboBoxColumn display a different set of values
for each different row in a DataGridView? What I mean is, given the
following situation,
ParentTable
parent_id (1) ......... active_child_id_fk (3)
parent_id (2) ......... active_child_id_fk (4)
parent_id (3) ......... active_child_id_fk (7)
ChildTable
child_id (1) .......... parent_id_fk (1)
child_id (2) .......... parent_id_fk (1)
child_id (3) .......... parent_id_fk (1)
child_id (4) .......... parent_id_fk (2)
child_id (5) .......... parent_id_fk (2)
child_id (6) .......... parent_id_fk (3)
child_id (7) .......... parent_id_fk (3)
where the parent_id_fk field in ChildTable is part of a normal relationship
and describes the available set of child records available for each parent
and the active_child_id_fk in ParentTable holds an 'active' child, is there
any way to have a DataGridView display the ParentTable record-set and for
the active_child_column to display a combobox that lists only the child
records that are available for the current parent record? (It is different
from the usual situation where the combobox holds the same set of records
for all the records in the DataGridView, in the usual case those are the
parent records...) The relationship details in my case don't actually
matter, let' say that there is a 'generic' mechanism to get the available
set... not necessarily a parent-child relationship, but maybe some other
kind of filtering...
Thanks in advance.
pax
(VS2005 Standard, SQLExpress2005, WinXpSP2)
Is there any way to have a ComboBoxColumn display a different set of values
for each different row in a DataGridView? What I mean is, given the
following situation,
ParentTable
parent_id (1) ......... active_child_id_fk (3)
parent_id (2) ......... active_child_id_fk (4)
parent_id (3) ......... active_child_id_fk (7)
ChildTable
child_id (1) .......... parent_id_fk (1)
child_id (2) .......... parent_id_fk (1)
child_id (3) .......... parent_id_fk (1)
child_id (4) .......... parent_id_fk (2)
child_id (5) .......... parent_id_fk (2)
child_id (6) .......... parent_id_fk (3)
child_id (7) .......... parent_id_fk (3)
where the parent_id_fk field in ChildTable is part of a normal relationship
and describes the available set of child records available for each parent
and the active_child_id_fk in ParentTable holds an 'active' child, is there
any way to have a DataGridView display the ParentTable record-set and for
the active_child_column to display a combobox that lists only the child
records that are available for the current parent record? (It is different
from the usual situation where the combobox holds the same set of records
for all the records in the DataGridView, in the usual case those are the
parent records...) The relationship details in my case don't actually
matter, let' say that there is a 'generic' mechanism to get the available
set... not necessarily a parent-child relationship, but maybe some other
kind of filtering...
Thanks in advance.
pax
(VS2005 Standard, SQLExpress2005, WinXpSP2)