Filtering related child records in a dataview
From: adr (adrottenberg_at_gmail.com)
Date: 12/27/04
- Previous message: Kristian F. Thomsen: "Re: Dataview in another assembly"
- Messages sorted by: [ date ] [ thread ]
Date: 26 Dec 2004 17:49:13 -0800
Hi Everyone,
I have a typical orders/order details relationship bound to a form. I
used the VS 2002 designer to bind textboxes to a dataview on the parent
records and a datagrid to the related order details. I want to let the
user filter the order details for a specific order e.g. Order #1 has
100 details from 10 different suppliers I added a combobox with all
suppliers so the user should be able to view items from a specific
supplier.
The problem is that the dataview rowfilter only recognizes fields from
the parent table (although the documentation states that you can
reference a child field by passing in "Child(FieldName)" that only
works in aggregate functions).
I tried this:
OrdersDataView.Table.ChildRelations("OrdersOrderDetails").ChildTable.DefaultView.RowFilter
= "SupplierID =" & FilterBySupplierComboBox.SelectedValue.ToString
But although it didn't give me an error the filter wasn't applied it
probably went in a different binding context.
The only solution I found was to use a DataviewManager the problem with
that is that I don't think it can be used in the designer. Does anyone
know of a different way of filtering the child records or do I have to
use a dataviewmanager and hand code all binding?
Thanks,
David
- Previous message: Kristian F. Thomsen: "Re: Dataview in another assembly"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|