combit List & Label 24 - .NET Online Web Help
Relations Property (IDataProvider)
Example 


combit.ListLabel24.DataProviders Namespace > IDataProvider Interface : Relations Property
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 Vista - Windows 10 Version 1809, Windows Server 2008 - 2016

See Also

Reference

IDataProvider Interface
IDataProvider Members