Repost: Child rows in data grid not updating position in child table's CurrencyManager..MS??

Repost: Child rows in data grid not updating position in child table's CurrencyManager..MS??

Post by Jame » Sat, 17 Nov 2001 07:40:40



I'm using the windows.forms.datagrid to display 2 related tables from a
dataset.  I've related the 2 tables using a dataset relation object and
bound the grid initially to the parent table.  As far as the grid display
goes, everything works as expected - you can drill into the parents and link
to each parent's child rows.

However, I also have some text boxes on the form bound to the same dataset
tables (for editing parents or children).  When parent rows are selected in
the datagrid, although the CurrencyManager's position for the parent table
is changed (and therefore the values in the parent's textboxes follow),
having linked to a parent's children, selecting a child row does not cause
the child table's currency manager to be re-positioned, resulting in the
children's bound textboxes not being populated (if I manually change the
position of the children's currency manager, they are).

Is this a bug or by design, and is there a workaround to get the most out of
this datagrid parent-child feature?
An obvious approach would be to re-position the child records' data manager
manually in the datagrid's navigate event, but there doesn't seem to be a
way to relate the 2 rows (and I've done that in the dataset's relation
object anyway!)

I'd appreciate it if someone could point me in the right direction with this
one or at least confirm it's a known bug....I can stop pulling my hair out
then!

TIA,

--James, UK

 
 
 

1. BUG? Child rows in data grid not updating position in child table's CurrencyManager

I'm using the windows.forms.datagrid to display 2 related tables from a
dataset.  I've related the 2 tables using a dataset relation object and
bound the grid initially to the parent table.  As far as the grid display
goes, everything works as expected - you can drill into the parents and link
to each parent's child rows.

However, I also have some text boxes on the form bound to the same dataset
tables (for editing parents or children).  When parent rows are selected in
the datagrid, although the CurrencyManager's position for the parent table
is changed (and therefore the values in the parent's textboxes follow),
having linked to a parent's children, selecting a child row does not cause
the child table's currency manager to be re-positioned, resulting in the
children's bound textboxes not being populated (if I manually change the
position of the children's currency manager, they are).

Is this a bug or by design, and is there a workaround to get the most out of
this datagrid parent-child feature?
An obvious approach would be to re-position the child records' data manager
manually in the datagrid's navigate event, but there doesn't seem to be a
way to relate the 2 rows (and I've done that in the dataset's relation
object anyway!)

I'd appreciate it if someone could point me in the right direction with this
one or at least confirm it's a known bug....I can stop pulling my hair out
then!

TIA,

--James, UK

2. Please settle an argument for me

3. .NET Add-ins in Excel do not show up in Add-ins

4. application executed using registry and a GUID

5. dataset with linked tables can't handle adding rows to parent and child, then updating?

6. Opinions on the Mustek tabloid size scanners?

7. Update on parent table resets rows in a child table

8. GUI for PGP 5.0 on Linux

9. Master/Child DataGrids: Child data is lost when creating new rows

10. Child table in grid - how to disable add/delete row?

11. using xmlschema to define the row/table format for a child table...

12. DataGrid won't display Child table data

13. Reading Child Row from a Datagrid displaying Parent-Child Realtionship