Let's assume that you want to hold all of this data locally, rather than
making individual database hits (which are expensive) every time that you
select a new customer.
First, you set up a data adapter for both the customer list and the customer
history. You then fill your DataSet with each of these DataTables, based on
these adapters. Now, you have an in-memory representation of both tables.
To navigate children, you need to create a DataRelation object that
establishes the relationship between these two.
Using this, you can now get the child rows of each DataRow in your customer
DataTable, and use this to databind to your second DataGrid.
--
Chris Jackson
Software Engineer
Microsoft MVP - Windows Client
Windows XP Associate Expert
--
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
--
"Tyro" <no****@please.com> wrote in message
news:HP****************@newssvr27.news.prodigy.com ...
I have a form that needs to add a customer and customer history in one
form.
customer (custid) --->custdetail (custid)
Is there anything easy in asp.net using DataAdapter, Dataset or DataTable
to
do this?
What's the best practice for doing this kind of stuff?