ClassColumns
Manages all columns in a worksheet, providing access to column properties, widths, and visibility.
Definition
Namespace:Telerik.Windows.Documents.Spreadsheet.Model
Assembly:Telerik.Windows.Documents.Spreadsheet.dll
Syntax:
public class Columns : RowsColumnsBase
Inheritance: objectWorksheetEntityBaseRowsColumnsBaseColumns
Inherited Members
Properties
Count
The total number of columns in the worksheet.
Declaration
public override int Count { get; }
Property Value
The row / column count.
Overrides
this[CellIndex]
Accesses the column containing the specified cell index.
Declaration
public ColumnSelection this[CellIndex cellIndex] { get; }
Parameters
cellIndex
Property Value
The column selection.
this[CellRange]
Accesses the columns intersecting the specified cell range.
Declaration
public ColumnSelection this[CellRange cellRange] { get; }
Parameters
cellRange
Property Value
The column selection.
this[IEnumerable<CellRange>]
Accesses the columns intersecting a collection of cell ranges.
Declaration
public ColumnSelection this[IEnumerable<CellRange> cellRanges] { get; }
Parameters
cellRanges
Property Value
The column selection.
this[int, int]
Accesses a range of columns by start and end indices, returning a selection for batch operations.
Declaration
public ColumnSelection this[int fromIndex, int toIndex] { get; }
Parameters
fromIndex
toIndex
Property Value
The column selection.
this[int]
Accesses a single column by index, returning a selection for applying properties or operations.
Declaration
public ColumnSelection this[int index] { get; }
Parameters
index
Property Value
The column selection.
Methods
CanInsert(int, int)
Checks whether the specified number of columns can be inserted at the given index without exceeding worksheet limits.
GetColumnSelection(CellIndex)
Creates a selection for the column containing the specified cell index.
Declaration
public ColumnSelection GetColumnSelection(CellIndex cellIndex)
Parameters
cellIndex
Index of the cell.
Returns
The column selection.
GetColumnSelection(CellRange)
Creates a selection for the columns intersecting the specified cell range.
Declaration
public ColumnSelection GetColumnSelection(CellRange cellRange)
Parameters
cellRange
The cell range.
Returns
The column selection.
GetColumnSelection(IEnumerable<CellRange>)
Creates a selection for the columns intersecting a collection of cell ranges.
Declaration
public ColumnSelection GetColumnSelection(IEnumerable<CellRange> cellRanges)
Parameters
cellRanges
The cell ranges.
Returns
The column selection.
GetColumnSelection(int)
Creates a selection for the column at the specified index.
Declaration
public ColumnSelection GetColumnSelection(int index)
Parameters
index
The index.
Returns
The column selection.
GetColumnSelection(int, int)
Creates a selection for the range of columns between the start and end indices.
Declaration
public ColumnSelection GetColumnSelection(int fromIndex, int toIndex)
Parameters
fromIndex
From index.
toIndex
To index.
Returns
The column selection.
GetDefaultWidth()
Retrieves the default width applied to all columns without explicit width settings.
Declaration
public ColumnWidth GetDefaultWidth()
Returns
The column width
InsertOverride(int, int)
Inserts the specified number of columns at the given index, shifting existing columns to the right.
RemoveOverride(int, int)
Removes the specified number of columns starting at the given index, shifting remaining columns to the left.
SetDefaultWidth(ColumnWidth)
Sets the default width for all columns without explicit width settings.
Declaration
public void SetDefaultWidth(ColumnWidth width)
Parameters
width
The width.
Events
ColumnsWidthChanged
Raised when one or more column widths change, providing the affected column index range.
Declaration
public event EventHandler<RowColumnPropertyChangedEventArgs> ColumnsWidthChanged
Event Value