W
WineNCheese
Hello,
I have a simple master-detail scenario, so I've set up the dataset with two
tables and a relation between them. When I have two data grids, one bound
to the master table's default view, the other bound to the relation,
navigation reacts as expected. However, I cannot seem to determine how to
modify the bindings to use a second DataView (it applies a simple filter)
for the master grid, while retaining the relation. I've determined the
DataView is filtering correctly, but I can't seem to get the binding
correct. Is there a way to do this?
In other words:
grid1.DataSource = ds.table1.DefaultView;
grid2.DataSource = ds'
grid2.DataMember = "table1.relation1"
works fine.
If I do the following:
grid1.DataSource = MyDataView;
How do I set the binding for grid2 so that the relation is maintained and
child records are displayed as per selection in grid1?
WNC
I have a simple master-detail scenario, so I've set up the dataset with two
tables and a relation between them. When I have two data grids, one bound
to the master table's default view, the other bound to the relation,
navigation reacts as expected. However, I cannot seem to determine how to
modify the bindings to use a second DataView (it applies a simple filter)
for the master grid, while retaining the relation. I've determined the
DataView is filtering correctly, but I can't seem to get the binding
correct. Is there a way to do this?
In other words:
grid1.DataSource = ds.table1.DefaultView;
grid2.DataSource = ds'
grid2.DataMember = "table1.relation1"
works fine.
If I do the following:
grid1.DataSource = MyDataView;
How do I set the binding for grid2 so that the relation is maintained and
child records are displayed as per selection in grid1?
WNC