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


In This Topic
    Tables Property (IDataProvider)
    In This Topic
    This property is queried to receive all available tables of the data provider.
    Syntax
    'Declaration
     
    
    ReadOnly Property Tables As ReadOnlyCollection(Of ITable)
    Example
    List<ITable> _tables;
    ReadOnlyCollection<ITable> IDataProvider.Tables
    {
        get
        {
            if (_tables == null)
            {
                _tables = new List<ITable>();
                foreach (DataTable dt in _dataViewManager.DataSet.Tables)
                {
                    _tables.Add(new DataViewWrapper(_dataViewManager.CreateDataView(dt)));
                }
            }
            return _tables.AsReadOnly();
        }
    }
    
    Private _tables As List(Of ITable)
    Readonly Property Tables() As ReadOnlyCollection(Of ITable) Implements IDataProvider.Tables
        Get
            If _tables = Nothing Then
                _tables = New List(Of ITable)()
                For Each dt As DataTable In _dataViewManager.DataSet.Tables
                    _tables.Add(New DataViewWrapper(_dataViewManager.CreateDataView(dt)))
                Next
            End If
            Return _tables.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