dataview relations

  • Thread starter Thread starter sebastian gereck
  • Start date Start date
S

sebastian gereck

hallo
i try to fill 3 grids with relational data.
customer -> orders -> orderdetail

dvcustomer = dvm.createdataview(
ds.tables["customer"]);//dvm->dataviewmanager
dvorders = dvm.createdataview( ds.tables["orders"]);
dvorderdetail= dvm.createdataview( ds.tables["orderdetail"]);

foreach( DataRowView drv1 in dvcustomer)
{
dvcustomer = drv1.CreateChildView(drcustomer_orders);
}
foreach (DataRowView drv2 in dvorders)
{
dvorderdetail = drv2.CreateChildView( drorders_orderdetail);
}

grid1.datasource = dvm;
grid1.datamember = "customer";
grid2.datasource = dvm;
grid2.datamember = "customer.customer_orders";// relation
grid3.datasource = dvm;
grid3.datamember = "orders.orders_orderdetail";// relation

it works fine , althgough grid3 shows the correct initial rows it is not
updated when i change the current row in grid1 or grid2. when i change
current row in grid1, grid2 is updated correctly.

i have played around with the values for datasources/ datamembers but
grid3 will not work as i expected.

thanks for help
sebastian
 
Back
Top