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

Re: dataview relations by sebastian

sebastian
Mon Oct 02 09:09:08 CDT 2006


ok, i have it.


sebastian gereck schrieb:
> 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
>
>
>
>
>
>