combit List & Label 29 - .NET Help
combit.Reporting.DataProviders Namespace / IDataProvider Interface / Relations Property


In This Topic
    Relations Property (IDataProvider)
    In This Topic
    This property is queried to receive all available relations between the tables of the data provider.
    Syntax
    Example
    List<ITableRelation> _relations;
    ReadOnlyCollection<ITableRelation> Relations
    {
        get
        {
            if (_relations == null)
            {
                _relations = new List<ITableRelation>();
                foreach (DataRelation dr in _dataViewManager.DataSet.Relations)
                {
                    _relations.Add(new DataRelationWrapper(dr));
                }
            }
            return _relations.AsReadOnly();
        }
    }
    
    Private _relations As List(Of ITableRelation)
    Readonly Property Relations() As ReadOnlyCollection(Of ITableRelation)
        Get
            If _relations = Nothing Then
                _relations = New List(Of ITableRelation)()
                For Each dr As DataRelation In _dataViewManager.DataSet.Relations
                    _relations.Add(New DataRelationWrapper(dr))
                Next
            End If
            Return _relations.AsReadOnly()
        End Get
    End Property
    
    Requirements

    Platforms: Windows 10 (Version 21H2 - 23H2), Windows 11 (21H2 - 22H2), Windows Server 2016 - 2022
    .NET: .NET Framework 4.8, .NET 6, .NET 7, .NET 8

    See Also