New to Telerik Document ProcessingStart a free 30-day trial

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:

C#
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.GetIsStrikethrough()SelectionBase.SetIsStrikethrough(bool)SelectionBase.ClearIsStrikethrough()SelectionBase.GetVerticalTextAlignment()SelectionBase.SetVerticalTextAlignment(VerticalTextAlignment)SelectionBase.ClearVerticalTextAlignment()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

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

C#
public void AutoFitWidth()

Makes the selected columns visible if they are currently hidden.

C#
public void ClearHidden()

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

C#
public void ClearWidth()

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

C#
public void ExpandToFitNumberValuesWidth()

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

C#
protected override void GetFromToIndexFromRange(CellRange cellRange, out int fromIndex, out int toIndex)
Parameters:cellRangeCellRange

The cell range.

fromIndexint

From index.

toIndexint

To index.

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

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

C#
public RangePropertyValue<bool> GetHidden()
Returns:

RangePropertyValue<bool>

The value of the hidden property

Retrieves the outline grouping level for the selected columns.

C#
public override RangePropertyValue<int> GetOutlineLevel()
Returns:

RangePropertyValue<int>

The outline level.

Overrides: RowColumnSelectionBase.GetOutlineLevel()

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

C#
public RangePropertyValue<ColumnWidth> GetWidth()
Returns:

RangePropertyValue<ColumnWidth>

The width for the selection.

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

C#
public bool Insert()
Returns:

bool

The value indicating whether the insert was successful.

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

C#
public void Remove()

Applies border styling to all cells in the selected columns.

C#
public override void SetBorders(CellBorders value)
Parameters:valueCellBorders

The value.

Overrides: SelectionBase.SetBorders(CellBorders)

Hides or shows the selected columns in the worksheet view.

C#
public void SetHidden(bool value)
Parameters:valuebool

The value indicating whether the selected columns are hidden.

Applies the specified width to all selected columns.

C#
public void SetWidth(ColumnWidth value)
Parameters:valueColumnWidth

The value.