all groups > dotnet windows forms > january 2005 >
You're in the

dotnet windows forms

group:

Writing a simple parent-child dataform


Writing a simple parent-child dataform Danny Liberty
1/7/2005 10:25:51 AM
dotnet windows forms:
Hi,

I have a simple windows form with a few textboxes bound to a table in a
dataset and a datagrid bound to it's child table.
I am trying to perform a very simple task : Programatically add a
record to the child table. Of course I can do this using the Rows
collection and the Add method, but I need the new record to refer to
the one of it's current parent (represented by the form).
Any suggestions would be greatly appreciated.


Danny
Re: Writing a simple parent-child dataform Chris
1/7/2005 11:07:32 AM
Check out the GetChildRows method. If you have the data loaded in a
dataset, then that will get all the child rows for a selected master
record.

This article may help:

http://msdn.microsoft.com/msdnmag/issues/02/11/DataPoints/default.aspx
AddThis Social Bookmark Button