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
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class Columns

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

Inheritance
System.Object
WorksheetEntityBase
RowsColumnsBase
Columns
Inherited Members
RowsColumnsBase.Insert(Int32)
RowsColumnsBase.Insert(Int32, Int32)
RowsColumnsBase.Remove(Int32)
RowsColumnsBase.Remove(Int32, Int32)
RowsColumnsBase.Cells
WorksheetEntityBase.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 Columns : RowsColumnsBase

Properties

Count

The total number of columns in the worksheet.

Declaration
public override int Count { get; }
Property Value
System.Int32

The row / column count.

Overrides
RowsColumnsBase.Count

Item[IEnumerable<CellRange>]

Accesses the columns intersecting a collection of cell ranges.

Declaration
public ColumnSelection this[IEnumerable<CellRange> cellRanges] { get; }
Parameters
System.Collections.Generic.IEnumerable<CellRange> cellRanges

Property Value
ColumnSelection

The column selection.

Item[Int32]

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

Declaration
public ColumnSelection this[int index] { get; }
Parameters
System.Int32 index

Property Value
ColumnSelection

The column selection.

Item[Int32, Int32]

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
System.Int32 fromIndex

System.Int32 toIndex

Property Value
ColumnSelection

The column selection.

Item[CellIndex]

Accesses the column containing the specified cell index.

Declaration
public ColumnSelection this[CellIndex cellIndex] { get; }
Parameters
CellIndex cellIndex

Property Value
ColumnSelection

The column selection.

Item[CellRange]

Accesses the columns intersecting the specified cell range.

Declaration
public ColumnSelection this[CellRange cellRange] { get; }
Parameters
CellRange cellRange

Property Value
ColumnSelection

The column selection.

Methods

CanInsert(Int32, Int32)

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

Declaration
public override bool CanInsert(int index, int itemCount)
Parameters
System.Int32 index

The index.

System.Int32 itemCount

The item count.

Returns
System.Boolean

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

Overrides
RowsColumnsBase.CanInsert(Int32, Int32)

GetColumnSelection(IEnumerable<CellRange>)

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

Declaration
public ColumnSelection GetColumnSelection(IEnumerable<CellRange> cellRanges)
Parameters
System.Collections.Generic.IEnumerable<CellRange> cellRanges

The cell ranges.

Returns
ColumnSelection

The column selection.

GetColumnSelection(Int32)

Creates a selection for the column at the specified index.

Declaration
public ColumnSelection GetColumnSelection(int index)
Parameters
System.Int32 index

The index.

Returns
ColumnSelection

The column selection.

GetColumnSelection(Int32, Int32)

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

Declaration
public ColumnSelection GetColumnSelection(int fromIndex, int toIndex)
Parameters
System.Int32 fromIndex

From index.

System.Int32 toIndex

To index.

Returns
ColumnSelection

The column selection.

GetColumnSelection(CellIndex)

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

Declaration
public ColumnSelection GetColumnSelection(CellIndex cellIndex)
Parameters
CellIndex cellIndex

Index of the cell.

Returns
ColumnSelection

The column selection.

GetColumnSelection(CellRange)

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

Declaration
public ColumnSelection GetColumnSelection(CellRange cellRange)
Parameters
CellRange cellRange

The cell range.

Returns
ColumnSelection

The column selection.

GetDefaultWidth()

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

Declaration
public ColumnWidth GetDefaultWidth()
Returns
ColumnWidth

The column width

InsertOverride(Int32, Int32)

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

Declaration
protected override bool InsertOverride(int index, int itemCount)
Parameters
System.Int32 index

The index.

System.Int32 itemCount

The item count.

Returns
System.Boolean

Overrides
RowsColumnsBase.InsertOverride(Int32, Int32)

RemoveOverride(Int32, Int32)

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

Declaration
protected override void RemoveOverride(int index, int itemCount)
Parameters
System.Int32 index

The index.

System.Int32 itemCount

The item count.

Overrides
RowsColumnsBase.RemoveOverride(Int32, Int32)

SetDefaultWidth(ColumnWidth)

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

Declaration
public void SetDefaultWidth(ColumnWidth width)
Parameters
ColumnWidth 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 Type
System.EventHandler<RowColumnPropertyChangedEventArgs>

Extension Methods

SvgExtentions.Traverse<T>(T, Func<T, IEnumerable<T>>)
SvgExtentions.TraverseDepthFirst<T>(T, Func<T, IEnumerable<T>>)
Getting Started
  • Install Now
  • Demos
  • Step-by-Step Tutorial
  • Sample Applications
  • SDK Samples
  • Visual Studio Extensions
Support Resources
  • Code Library
  • Knowledge Base
  • Videos
Community
  • Forums
  • Blogs
  • Feedback Portal
  • 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.