Binding and saving DataGrid object with related DataTables fields
From: David K. (kerenshor_at_013.net)
Date: 03/25/05
- Next message: Chris Zopers: "Performance with DataSet: suggestions for best practices?"
- Previous message: Erwin Pant via DotNetMonster.com: "Re: Datagrids - Rows???"
- Messages sorted by: [ date ] [ thread ]
Date: 25 Mar 2005 00:32:53 -0800
I am using C# .NET, and have 3 tables:
Customers, with the fields CustomerID (primary key), CustomerName.
Items, with the fields ItemID (primary key), ItemName.
Orders, with the fields CustomerID (primary and foreign keys), ItemID
(primary and foreign keys), Quantity.
The Customers and Orders Tables are one-to-many related by the
CustomerID field.
The Items and Orders Tables are one-to-many related by the ItemID
field.
I would like to bind the Orders table to a Windows Forms DataGrid, but
I would like that the CustomerName (from the Customers table) and the
ItemName (from the Items table) would be displayed in the DataGrid, as
well.
By the way, I already have another 2 DataGrids in order to maintain the
Customers and Items tables.
I would like that any change made to the DataGrid (either insert.
Delete or update) will effect the Orders table in the database.
My questions are:
1. How should I perform all the TableMappings?
2. Do I need 3 DataAdapters objects, or maybe 1 DataAdapters object
will do?
3. How should I bind the DataGrid?
Your help will be appreciated.
Thanks,
David
- Next message: Chris Zopers: "Performance with DataSet: suggestions for best practices?"
- Previous message: Erwin Pant via DotNetMonster.com: "Re: Datagrids - Rows???"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|