Miha
Sun Apr 02 06:57:59 CDT 2006
Hi Jeronimo,
Instead of using GetChildRows, use new DataView over child table with
relation conditions (manually filtering rows).
--
Miha Markic [MVP C#]
RightHand .NET consulting & development www.rthand.com
Blog:
http://cs.rthand.com/blogs/blog_with_righthand/
"Jeronimo Bertran" <jeronimo.bertran@newsgroup.nospam> wrote in message
news:Xns9798853F24F7publicjbbertrancom@207.46.248.16...
> Sorry, here is a detailed description of the problem.
>
>
> My dataset hast tow tables which are used as master/detail. Assume table1
> is Customers and table2 is Orders. I need to export all of the orders for
> a given customers in a particular order.
>
>
> Thr relationship is defined as
>
> this.relationFK_Orders_Customers = new System.Data.DataRelation
> ("FK_Orders_Customers", new System.Data.DataColumn[] {
> this.tableCustomers.CustomerIDColumn}, new
> System.Data.DataColumn[] {
> this.tableOrders.CustomerIDColumn}, false);
>
>
>
> Now, in order to export the records for a given customer row I am doing
> the
> following:
>
> // need to sort the orders
> foreach (dataset.OrdersRow order in customerRow.GetChildRows
> ("FK_Orders_Customers"))
> {
>
> // Export order
> }
>
>
> I don't see how I can use the dataView here.
>
> Thanks
>
> Jeronimo Bertran