Filtering the Detail Datagrid in a Master Detail Relationship

Filtering the Detail Datagrid in a Master Detail Relationship

Post by Qm9i » Tue, 21 Dec 2004 00:07:04


Can anyone give an example of how to filter the detail datagrid that is
databound in a master detail relationship.

I need to display only a subset of the detail records.

Thanks
 
 
 

Filtering the Detail Datagrid in a Master Detail Relationship

Post by Gregory A. » Tue, 21 Dec 2004 05:00:29

1.x Framework, I assume (rather than Whidbey):
Underneath the hood, you always have a DataView when you bind to a grid. If
you do not specify explicitly, the "DefaultView" for the table in question
(1st table in a DataSet if none is explicitly set) is used. To easily take
control, you can create a DataSet with two tables (summary and detail) and
use a filter on an explicitly created DataView that works on the key value
in question.

Hope this makes sense.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think outside the box!
*************************************************