New to Telerik Document ProcessingStart a free 30-day trial

Columns

Class

Manages all columns in a worksheet, providing access to column properties, widths, and visibility.

Definition

Events

Raised when one or more column widths change, providing the affected column index range.

C#
public event EventHandler<RowColumnPropertyChangedEventArgs> ColumnsWidthChanged

Methods

Checks whether the specified number of columns can be inserted at the given index without exceeding worksheet limits.

C#
public override bool CanInsert(int index, int itemCount)
Parameters:indexint

The index.

itemCountint

The item count.

Returns:

bool

The value indicating whether this instance can be inserted at the specified index

Overrides: RowsColumnsBase.CanInsert(int, int)

Creates a selection for the column containing the specified cell index.

C#
public ColumnSelection GetColumnSelection(CellIndex cellIndex)
Parameters:cellIndexCellIndex

Index of the cell.

Returns:

ColumnSelection

The column selection.

Creates a selection for the columns intersecting the specified cell range.

C#
public ColumnSelection GetColumnSelection(CellRange cellRange)
Parameters:cellRangeCellRange

The cell range.

Returns:

ColumnSelection

The column selection.

Creates a selection for the columns intersecting a collection of cell ranges.

C#
public ColumnSelection GetColumnSelection(IEnumerable<CellRange> cellRanges)
Parameters:cellRangesIEnumerable<CellRange>

The cell ranges.

Returns:

ColumnSelection

The column selection.

Creates a selection for the range of columns between the start and end indices.

C#
public ColumnSelection GetColumnSelection(int fromIndex, int toIndex)
Parameters:fromIndexint

From index.

toIndexint

To index.

Returns:

ColumnSelection

The column selection.

Creates a selection for the column at the specified index.

C#
public ColumnSelection GetColumnSelection(int index)
Parameters:indexint

The index.

Returns:

ColumnSelection

The column selection.

Retrieves the default width applied to all columns without explicit width settings.

C#
public ColumnWidth GetDefaultWidth()
Returns:

ColumnWidth

The column width

Inserts the specified number of columns at the given index, shifting existing columns to the right.

C#
protected override bool InsertOverride(int index, int itemCount)
Parameters:indexint

The index.

itemCountint

The item count.

Returns:

bool

Overrides: RowsColumnsBase.InsertOverride(int, int)

Removes the specified number of columns starting at the given index, shifting remaining columns to the left.

C#
protected override void RemoveOverride(int index, int itemCount)
Parameters:indexint

The index.

itemCountint

The item count.

Overrides: RowsColumnsBase.RemoveOverride(int, int)

Sets the default width for all columns without explicit width settings.

C#
public void SetDefaultWidth(ColumnWidth width)
Parameters:widthColumnWidth

The width.

Properties

The total number of columns in the worksheet.

C#
public override int Count { get; }
Property Value:

The row / column count.

Overrides: RowsColumnsBase.Count

Accesses the column containing the specified cell index.

C#
public ColumnSelection this[CellIndex cellIndex] { get; }
Parameters:cellIndexCellIndexProperty Value:

The column selection.

Accesses the columns intersecting the specified cell range.

C#
public ColumnSelection this[CellRange cellRange] { get; }
Parameters:cellRangeCellRangeProperty Value:

The column selection.

Accesses the columns intersecting a collection of cell ranges.

C#
public ColumnSelection this[IEnumerable<CellRange> cellRanges] { get; }
Parameters:cellRangesIEnumerable<CellRange>Property Value:

The column selection.

Accesses a range of columns by start and end indices, returning a selection for batch operations.

C#
public ColumnSelection this[int fromIndex, int toIndex] { get; }
Parameters:fromIndexinttoIndexintProperty Value:

The column selection.

Accesses a single column by index, returning a selection for applying properties or operations.

C#
public ColumnSelection this[int index] { get; }
Parameters:indexintProperty Value:

The column selection.