Class
ColumnSelection

A selection of one or more worksheet columns for applying properties, formatting, and operations in batch.

Definition

Namespace:Telerik.Windows.Documents.Spreadsheet.Model

Assembly:Telerik.Windows.Documents.Spreadsheet.dll

Syntax:

cs-api-definition
public class ColumnSelection : RowColumnSelectionBase

Inheritance: objectSelectionBaseRowColumnSelectionBaseColumnSelection

Inherited Members RowColumnSelectionBase.GetPropertyValue<T>(IPropertyDefinition<T>)RowColumnSelectionBase.Group()RowColumnSelectionBase.Ungroup()RowColumnSelectionBase.SetOutlineLevel(int)RowColumnSelectionBase.ClearOutlineLevel()SelectionBase.BeginUpdate()SelectionBase.EndUpdate()SelectionBase.ExecuteForEachRangeInsideBeginEndUpdate(Action<CellRange>)SelectionBase.ExecuteForEachRangeInsideBeginEndUpdate(IEnumerable<CellRange>, Action<CellRange>, Predicate<CellRange>)SelectionBase.ExecuteForEachRange(Action<CellRange>)SelectionBase.ExecuteForEachRange(IEnumerable<CellRange>, Action<CellRange>, Predicate<CellRange>)SelectionBase.GetPropertyValue<T>(Func<CellRange, RangePropertyValue<T>>, IEnumerable<CellRange>, T)SelectionBase.GetTopLeftCellIndex()SelectionBase.Clear(ClearType)SelectionBase.GetFormat()SelectionBase.SetFormat(CellValueFormat)SelectionBase.ClearFormat()SelectionBase.GetStyleName()SelectionBase.SetStyleName(string)SelectionBase.ClearStyleName()SelectionBase.GetFill()SelectionBase.SetFill(IFill)SelectionBase.ClearFill()SelectionBase.GetFontFamily()SelectionBase.SetFontFamily(ThemableFontFamily)SelectionBase.ClearFontFamily()SelectionBase.GetFontSize()SelectionBase.SetFontSize(double)SelectionBase.ClearFontSize()SelectionBase.GetIsBold()SelectionBase.SetIsBold(bool)SelectionBase.ClearIsBold()SelectionBase.GetIsItalic()SelectionBase.SetIsItalic(bool)SelectionBase.ClearIsItalic()SelectionBase.GetUnderline()SelectionBase.SetUnderline(UnderlineType)SelectionBase.ClearUnderline()SelectionBase.GetForeColor()SelectionBase.SetForeColor(ThemableColor)SelectionBase.ClearForeColor()SelectionBase.GetHorizontalAlignment()SelectionBase.SetHorizontalAlignment(RadHorizontalAlignment)SelectionBase.ClearHorizontalAlignment()SelectionBase.GetVerticalAlignment()SelectionBase.SetVerticalAlignment(RadVerticalAlignment)SelectionBase.ClearVerticalAlignment()SelectionBase.GetIndent()SelectionBase.SetIndent(int)SelectionBase.ClearIndent()SelectionBase.IncreaseIndent()SelectionBase.DecreaseIndent()SelectionBase.GetIsWrapped()SelectionBase.SetIsWrapped(bool)SelectionBase.ClearIsWrapped()SelectionBase.GetTextRotation()SelectionBase.SetTextRotation(int)SelectionBase.ClearTextRotation()SelectionBase.GetBorders()SelectionBase.ClearBorders()SelectionBase.GetIsLocked()SelectionBase.SetIsLocked(bool)SelectionBase.ClearIsLocked()SelectionBase.CellRangesSelectionBase.Worksheet

Methods

AutoFitWidth()

Calculates and applies the optimal width for selected columns based on their content.

Declaration

cs-api-definition
public void AutoFitWidth()

ClearHidden()

Makes the selected columns visible if they are currently hidden.

Declaration

cs-api-definition
public void ClearHidden()

ClearWidth()

Resets the width of selected columns to the default worksheet column width.

Declaration

cs-api-definition
public void ClearWidth()

ExpandToFitNumberValuesWidth()

Expands column widths to accommodate numeric values without truncation, preserving custom widths.

Declaration

cs-api-definition
public void ExpandToFitNumberValuesWidth()

GetFromToIndexFromRange(CellRange, out int, out int)

Extracts the start and end column indices from a cell range.

Declaration

cs-api-definition
protected override void GetFromToIndexFromRange(CellRange cellRange, out int fromIndex, out int toIndex)

Parameters

cellRange

CellRange

The cell range.

fromIndex

int

From index.

toIndex

int

To index.

Overrides RowColumnSelectionBase.GetFromToIndexFromRange(CellRange, out int, out int)

GetHidden()

Retrieves whether the selected columns are hidden in the worksheet view.

Declaration

cs-api-definition
public RangePropertyValue<bool> GetHidden()

Returns

RangePropertyValue<bool>

The value of the hidden property

GetOutlineLevel()

Retrieves the outline grouping level for the selected columns.

Declaration

cs-api-definition
public override RangePropertyValue<int> GetOutlineLevel()

Returns

RangePropertyValue<int>

The outline level.

Overrides RowColumnSelectionBase.GetOutlineLevel()

GetWidth()

Retrieves the width value for the selected columns, indicating whether the value is uniform or varies.

Declaration

cs-api-definition
public RangePropertyValue<ColumnWidth> GetWidth()

Returns

RangePropertyValue<ColumnWidth>

The width for the selection.

Insert()

Inserts new columns at the position of the selected columns, shifting existing columns to the right.

Declaration

cs-api-definition
public bool Insert()

Returns

bool

The value indicating whether the insert was successful.

Remove()

Deletes the selected columns from the worksheet, shifting remaining columns to the left.

Declaration

cs-api-definition
public void Remove()

SetBorders(CellBorders)

Applies border styling to all cells in the selected columns.

Declaration

cs-api-definition
public override void SetBorders(CellBorders value)

Parameters

value

CellBorders

The value.

Overrides SelectionBase.SetBorders(CellBorders)

SetHidden(bool)

Hides or shows the selected columns in the worksheet view.

Declaration

cs-api-definition
public void SetHidden(bool value)

Parameters

value

bool

The value indicating whether the selected columns are hidden.

SetWidth(ColumnWidth)

Applies the specified width to all selected columns.

Declaration

cs-api-definition
public void SetWidth(ColumnWidth value)

Parameters

value

ColumnWidth

The value.