skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • Roadmap
    • Release History
  • Docs & Support
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class ColumnSelection

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

Inheritance
System.Object
SelectionBase
RowColumnSelectionBase
ColumnSelection
Inherited Members
RowColumnSelectionBase.GetPropertyValue<T>(IPropertyDefinition<T>)
RowColumnSelectionBase.Group()
RowColumnSelectionBase.Ungroup()
RowColumnSelectionBase.SetOutlineLevel(Int32)
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(Boolean)
SelectionBase.ClearIsBold()
SelectionBase.GetIsItalic()
SelectionBase.SetIsItalic(Boolean)
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(Int32)
SelectionBase.ClearIndent()
SelectionBase.IncreaseIndent()
SelectionBase.DecreaseIndent()
SelectionBase.GetIsWrapped()
SelectionBase.SetIsWrapped(Boolean)
SelectionBase.ClearIsWrapped()
SelectionBase.GetTextRotation()
SelectionBase.SetTextRotation(Int32)
SelectionBase.ClearTextRotation()
SelectionBase.GetBorders()
SelectionBase.ClearBorders()
SelectionBase.GetIsLocked()
SelectionBase.SetIsLocked(Boolean)
SelectionBase.ClearIsLocked()
SelectionBase.CellRanges
SelectionBase.Worksheet
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Telerik.Windows.Documents.Spreadsheet.Model
Assembly: Telerik.Windows.Documents.Spreadsheet.dll

Syntax

public class ColumnSelection : RowColumnSelectionBase

Methods

AutoFitWidth()

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

Declaration
public void AutoFitWidth()

ClearHidden()

Makes the selected columns visible if they are currently hidden.

Declaration
public void ClearHidden()

ClearWidth()

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

Declaration
public void ClearWidth()

ExpandToFitNumberValuesWidth()

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

Declaration
public void ExpandToFitNumberValuesWidth()

GetFromToIndexFromRange(CellRange, out Int32, out Int32)

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

Declaration
protected override void GetFromToIndexFromRange(CellRange cellRange, out int fromIndex, out int toIndex)
Parameters
CellRange cellRange

The cell range.

System.Int32 fromIndex

From index.

System.Int32 toIndex

To index.

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

GetHidden()

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

Declaration
public RangePropertyValue<bool> GetHidden()
Returns
RangePropertyValue<System.Boolean>

The value of the hidden property

GetOutlineLevel()

Retrieves the outline grouping level for the selected columns.

Declaration
public override RangePropertyValue<int> GetOutlineLevel()
Returns
RangePropertyValue<System.Int32>

The outline level.

Overrides
RowColumnSelectionBase.GetOutlineLevel()

GetWidth()

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

Declaration
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
public bool Insert()
Returns
System.Boolean

The value indicating whether the insert was successful.

Remove()

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

Declaration
public void Remove()

SetBorders(CellBorders)

Applies border styling to all cells in the selected columns.

Declaration
public override void SetBorders(CellBorders value)
Parameters
CellBorders value

The value.

Overrides
SelectionBase.SetBorders(CellBorders)

SetHidden(Boolean)

Hides or shows the selected columns in the worksheet view.

Declaration
public void SetHidden(bool value)
Parameters
System.Boolean value

The value indicating whether the selected columns are hidden.

SetWidth(ColumnWidth)

Applies the specified width to all selected columns.

Declaration
public void SetWidth(ColumnWidth value)
Parameters
ColumnWidth value

The value.

Getting Started
  • Getting Started
Support Resources
  • Documentation
Community
  • Forums
  • Blogs
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.