Updating hierarchical data

P

PontiMax

I'm working with the Northwind database
tables 'Customers', 'Orders', and 'Order
Details': 'CustomerID' relates 'Orders' to 'Customers',
and 'OrderID' relates 'Order Details' to 'Orders'. For
displaying this hierarchical data I create a DataSet,
append and fill a DataTable for each database table, and
finally set up two Relations.

Say, I want to bind the dataset to a flat DataGrid where
each row consists of the columns 'CompanyName' (from
table 'Customers'), 'OrderDate' (from table 'Orders'),
and 'Quantity' (from table 'Order Details'). The grid
should be editable, i.e. each data modification should be
send back to the database.

Are there any guidelines for implementing this
efficiently? Is it possible to bind datagrid columns to
different DataTables (which in turn belong to the same
DataSet)? How can I retain the relationship between
columns and DataTable items?

Thanks in advance,
PontiMax
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top