Filtering related child records in a dataview

From: adr (adrottenberg_at_gmail.com)
Date: 12/27/04

  • Next message: Matt: ">>>DO NOT LISTEN TO PAYPAL POSTS<<<"
    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


  • Next message: Matt: ">>>DO NOT LISTEN TO PAYPAL POSTS<<<"

    Relevant Pages

    • Re: Wie zugrundeliegende Connection wechseln oder besser auf Datenquellen verzichten?
      ... Peter F. verteitigt den Designer wie ein Ritter eine Burg, ... "DataGridView.Datasource = DataView" anschauen ... eines DataGridView immer eine DataView. ... eigentlichen Datenquelle DataTable eine zugehörige ...
      (microsoft.public.de.german.entwickler.dotnet.datenbank)
    • Re: dataview.rowfilter using relations
      ... A DataView is just an other word for the DefaultView in a DataTable, it reflects all the data conform the options you have set. ... You can create more DataViews for a DataTable then one DataTable, therefore beside the defaultview there are DataViews, however they return only the data that is in a datatable, conform that datatabe. ... When I edit the parent tables the edit is not reflected in ...
      (microsoft.public.dotnet.languages.vb)
    • Re: 2 Tabellen in DataView
      ... >> Bezeihung aus dem Parent holt. ... Im Gegensatz zu einer SQL Sicht stellt die DataView immer nur die ... in die Tabelle aufzunehmen. ... Next by Date: ...
      (microsoft.public.de.german.entwickler.dotnet.datenbank)
    • Re: DataSet mit TableRelation im DataGrid anzeigen??
      ... Ich übergebe dem Parent Control via 'ds.Tables.DefaultView' eigentlich ... > Wenn die Parent DataSource ein DataView ist, ... > Wenn die Parent DataSource ein DataRowArray ist, ist Container DataItem ... > vom Typ DataRow. ...
      (microsoft.public.de.german.entwickler.dotnet.asp)
    • Re: DataGrid, Relations and Binding
      ... using a DataView, however, I was uncertain how to use this class to obtain ... > rows for a specific parent row. ... >> rows that are children of a specific Apples row. ... Any advice would be much appreciated. ...
      (microsoft.public.dotnet.framework.adonet)

    Loading