I am using a typed DataSet in C# Express 2005 to build a master:detail relationship. I can do so by dragging the master table from a Data Sources window to the form, and then the detail table from the end of the list of objects in the master table. Two grids and all of the associated objects are created and all works as planned. As I move among master records in the master grid, the appropriate detail records are displayed in the second grid.

BUT - I need to filter the master records. I can do so by adding a DataView and setting it up appropriately. I can switch the DataSource of the master grid to the view and I can get see the results of the view's filter. But, the detail grid does not respond.

Is there a way to set this up in the designer, or do I need to write code to do this?

I can't believe that ADO.NET does not support this kind of thing, but then again, I guess I'm not surprised either.

Recommended Answers

All 2 Replies

Edit the query filled the DataAdapter...

Thanks. I figured that out shortly after I sent this in. Apparently the DataView has been devalued (which is probably why it doesn't show up in the ToolBox by default). The DataAdapter works as expected.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.