Class
Rows

Manages the collection of rows in a worksheet, providing access to row properties, heights, and operations like insert and remove.

Definition

Namespace:Telerik.Windows.Documents.Spreadsheet.Model

Assembly:Telerik.Windows.Documents.Spreadsheet.dll

Syntax:

cs-api-definition
public class Rows : RowsColumnsBase

Inheritance: objectWorksheetEntityBaseRowsColumnsBaseRows

Inherited Members RowsColumnsBase.Insert(int)RowsColumnsBase.Insert(int, int)RowsColumnsBase.Remove(int)RowsColumnsBase.Remove(int, int)RowsColumnsBase.CellsWorksheetEntityBase.Worksheet

Properties

Count

Gets the total number of rows in the worksheet.

Declaration

cs-api-definition
public override int Count { get; }

Property Value

int

The row / column count.

Overrides RowsColumnsBase.Count

this[CellIndex]

Gets a RowSelection for the row containing the specified cell index.

Declaration

cs-api-definition
public RowSelection this[CellIndex cellIndex] { get; }

Parameters

cellIndex

CellIndex

Property Value

RowSelection

The row selection.

this[CellRange]

Gets a RowSelection for the rows intersecting the specified cell range.

Declaration

cs-api-definition
public RowSelection this[CellRange cellRange] { get; }

Parameters

cellRange

CellRange

Property Value

RowSelection

The row selection.

this[IEnumerable<CellRange>]

Gets a RowSelection for the rows intersecting the specified collection of cell ranges.

Declaration

cs-api-definition
public RowSelection this[IEnumerable<CellRange> cellRanges] { get; }

Parameters

cellRanges

IEnumerable<CellRange>

Property Value

RowSelection

The row selection.

this[int, int]

Gets a RowSelection for the continuous range of rows between the specified start and end indices.

Declaration

cs-api-definition
public RowSelection this[int fromIndex, int toIndex] { get; }

Parameters

fromIndex

int

toIndex

int

Property Value

RowSelection

The row selection.

this[int]

Gets a RowSelection for the row at the specified index.

Declaration

cs-api-definition
public RowSelection this[int index] { get; }

Parameters

index

int

Property Value

RowSelection

The row selection.

Methods

CanInsert(int, int)

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

Declaration

cs-api-definition
public override bool CanInsert(int index, int itemCount)

Parameters

index

int

The index.

itemCount

int

The item count.

Returns

bool

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

Overrides RowsColumnsBase.CanInsert(int, int)

GetDefaultHeight()

Gets the default height applied to rows without custom height settings.

Declaration

cs-api-definition
public RowHeight GetDefaultHeight()

Returns

RowHeight

The row height

GetRowSelection(CellIndex)

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

Declaration

cs-api-definition
public RowSelection GetRowSelection(CellIndex cellIndex)

Parameters

cellIndex

CellIndex

Index of the cell.

Returns

RowSelection

The row selection

GetRowSelection(CellRange)

Creates a row selection for the rows intersecting the specified cell range.

Declaration

cs-api-definition
public RowSelection GetRowSelection(CellRange cellRange)

Parameters

cellRange

CellRange

The cell range.

Returns

RowSelection

The row selection

GetRowSelection(IEnumerable<CellRange>)

Creates a row selection for the rows intersecting the specified collection of cell ranges.

Declaration

cs-api-definition
public RowSelection GetRowSelection(IEnumerable<CellRange> cellRanges)

Parameters

cellRanges

IEnumerable<CellRange>

The cell ranges.

Returns

RowSelection

The row selection

GetRowSelection(int)

Creates a row selection for the single row at the specified index.

Declaration

cs-api-definition
public RowSelection GetRowSelection(int index)

Parameters

index

int

The index.

Returns

RowSelection

The row selection

GetRowSelection(int, int)

Creates a row selection for the continuous range of rows between the specified start and end indices.

Declaration

cs-api-definition
public RowSelection GetRowSelection(int fromIndex, int toIndex)

Parameters

fromIndex

int

From index.

toIndex

int

To index.

Returns

RowSelection

The row selection

InsertOverride(int, int)

Executes the row insertion command at the specified index, shifting existing rows downward.

Declaration

cs-api-definition
protected override bool InsertOverride(int index, int itemCount)

Parameters

index

int

The index.

itemCount

int

The item count.

Returns

bool

Overrides RowsColumnsBase.InsertOverride(int, int)

RemoveOverride(int, int)

Executes the row removal command at the specified index, shifting remaining rows upward.

Declaration

cs-api-definition
protected override void RemoveOverride(int index, int itemCount)

Parameters

index

int

The index.

itemCount

int

The item count.

Overrides RowsColumnsBase.RemoveOverride(int, int)

SetDefaultHeight(RowHeight)

Sets the default height for all rows that do not have a custom height assigned.

Declaration

cs-api-definition
public void SetDefaultHeight(RowHeight height)

Parameters

height

RowHeight

The height.

Events

RowsHeightsChanged

Raised when row heights are modified, providing the range of affected rows.

Declaration

cs-api-definition
public event EventHandler<RowColumnPropertyChangedEventArgs> RowsHeightsChanged

Event Value

EventHandler<RowColumnPropertyChangedEventArgs>