Skip to main content
All docs
V26.1
  • FederationDataSource.Relations Property

    Provides access to the collection of the FederationMasterDetailInfo objects that define master-detail relationships.

    Namespace: DevExpress.DataAccess.DataFederation

    Assembly: DevExpress.DataAccess.v26.1.dll

    NuGet Package: DevExpress.DataAccess

    Declaration

    public MasterDetailInfoCollection Relations { get; }

    Property Value

    Type Description
    MasterDetailInfoCollection

    A collection of master-detail relationships.

    Example

    To create a master-detail relationship between two queries, add an instance of the FederationMasterDetailInfo object to the Relations collection:

    Note

    The complete sample project How to Create a Federated Data Source at Runtime is available in the DevExpress Examples repository.

    using DevExpress.DataAccess.DataFederation;
    // ...
      federation.Relations.Add(new FederationMasterDetailInfo() {
          MasterQueryName = "Orders",
          DetailQueryName = "OrderDetail",
          KeyColumns = {
              new FederationRelationColumnInfo(){
                  ParentKeyColumn="OrderID",
                  NestedKeyColumn ="OrderID",
                  ConditionOperator= FederationConditionType.Equal
                  }
              }
      }
    
    See Also