combit List & Label 29 - .NET Help
combit.Reporting.DataProviders Namespace / ITableRow Interface / Columns Property
Example


In This Topic
    Columns Property (ITableRow)
    In This Topic
    This property is accessed to query the columns of the table row. If your data provider supports the ICanHandleUsedIdentifiers interface, you only need to return the columns received in SetUsedIdentifiers Method
    Syntax
    Example
    public ReadOnlyCollection<ITableColumn> Columns
    {
        get
        {
            List<ITableColumn> columns = new List<ITableColumn>();
    
            DataTable dt = _dataRowView.Row.Table;
    
            foreach (DataColumn dc in dt.Columns)
            {
                DataColumnWrapper current = new DataColumnWrapper(dc, _dataRowView[dc.ColumnName]);
                columns.Add(current);
            }
            return columns.AsReadOnly();
        }
    }
    Public Readonly Property Columns() As ReadOnlyCollection(Of ITableColumn)
        Get
            Dim columns As New List(Of ITableColumn)()
    
            Dim dt As DataTable = _dataRowView.Row.Table
    
            For Each dc As DataColumn In dt.Columns
                Dim current As New DataColumnWrapper(dc, _dataRowView(dc.ColumnName))
                columns.Add(current)
            Next
            Return columns.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