New to Telerik ReportingStart a free 30-day trial

Represents a collection of DataColumn objects.

Definition

Namespace:Telerik.Reporting

Assembly:Telerik.Reporting.dll

Syntax:

C#
[TypeConverter("Telerik.Reporting.Design.DataColumnCollectionConverter, Telerik.Reporting.Design, Version=20.1.26.615, Culture=neutral, PublicKeyToken=a9d7983dfcc261be")]
public class DataColumnCollection : Collection<DataColumn>

Inheritance: objectCollection<DataColumn>DataColumnCollection

Constructors

C#
public DataColumnCollection()

Properties

Gets a column by name.

C#
public DataColumn this[string name] { get; }
Parameters:namestring

The name of the column.

Property Value:

A column if found; otherwise null (Nothing)

Methods

Creates a DataColumn with specific settings and adds it to the DataColumnCollection.

C#
public DataColumn Add(string name, SimpleType columnType)
Parameters:namestring

A string value that will be used as Name for the newly created DataColumn.

columnTypeSimpleType

A SimpleType constant will be used for the newly created DataColumn.

Returns:

DataColumn

The newly created and added DataColumn

Adds an enumerable of DataColumn objects to the DataColumnCollection.

C#
public void AddRange(IEnumerable<DataColumn> enumerable)
Parameters:enumerableIEnumerable<DataColumn>

An enumerable of DataColumn objects to add to the DataColumnCollection.

Remarks:

The DataColumn objects returned from the enumerable are appended to the end of the DataColumnCollection.

C#
protected override void ClearItems()

Overrides: Collection<DataColumn>.ClearItems()

Determines whether the DataColumnCollection contains a column with a specific name.

C#
public bool Contains(string name)
Parameters:namestring

A string that specifies the parameter name for which to search the elements of the DataColumnCollection.

Returns:

bool

Returns a bool value indicating whether the DataColumnCollection object contains a report parameter with the specified name.

Determines the index of a specific column in the DataColumnCollection.

C#
public int IndexOf(string name)
Parameters:namestring

The parameter name used to locate the report parameter in the DataColumnCollection.

Returns:

int

The index of column if found in the DataColumnCollection; otherwise, -1.

Inserts an item to the DataColumnCollection at the specified index.

C#
protected override void InsertItem(int index, DataColumn item)
Parameters:indexint

The zero-based index at which item should be inserted.

itemDataColumn

The DataColumn to insert into the DataColumnCollection.

Overrides: Collection<DataColumn>.InsertItem(int, DataColumn)

C#
protected override void RemoveItem(int index)
Parameters:indexint

Overrides: Collection<DataColumn>.RemoveItem(int)