New to Telerik Document ProcessingStart a free 30-day trial

Manages the collection of horizontal and vertical page breaks for a worksheet, controlling pagination during printing.

Definition

Namespace:Telerik.Windows.Documents.Spreadsheet.Model.Printing

Assembly:Telerik.Windows.Documents.Spreadsheet.dll

Syntax:

C#
public class PageBreaks

Inheritance: objectPageBreaks

Methods

Removes all horizontal and vertical page breaks from the worksheet.

C#
public void Clear()

Attempts to insert a horizontal page break at the specified row, and returns whether the operation succeeded.

C#
public bool TryInsertHorizontalPageBreak(int rowIndex, int columnIndex)
Parameters:rowIndexint

Index of the row.

columnIndexint

Index of the column.

Returns:

bool

True if succeeded.

Attempts to insert both horizontal and vertical page breaks at the specified cell, and returns whether at least one break was added.

C#
public bool TryInsertPageBreaks(int rowIndex, int columnIndex)
Parameters:rowIndexint

Index of the row.

columnIndexint

Index of the column.

Returns:

bool

True if succeeded.

Attempts to insert a vertical page break at the specified column, and returns whether the operation succeeded.

C#
public bool TryInsertVerticalPageBreak(int rowIndex, int columnIndex)
Parameters:rowIndexint

Index of the row.

columnIndexint

Index of the column.

Returns:

bool

True if succeeded.

Attempts to remove the horizontal page break at the specified row, and returns whether the operation succeeded.

C#
public bool TryRemoveHorizontalPageBreak(int rowIndex, int columnIndex)
Parameters:rowIndexint

Index of the row.

columnIndexint

Index of the column.

Returns:

bool

True if succeeded.

Attempts to remove both horizontal and vertical page breaks at the specified cell, and returns whether at least one break was removed.

C#
public bool TryRemovePageBreaks(int rowIndex, int columnIndex)
Parameters:rowIndexint

Index of the row.

columnIndexint

Index of the column.

Returns:

bool

True if succeeded.

Attempts to remove the vertical page break at the specified column, and returns whether the operation succeeded.

C#
public bool TryRemoveVerticalPageBreak(int rowIndex, int columnIndex)
Parameters:rowIndexint

Index of the row.

columnIndexint

Index of the column.

Returns:

bool

True if succeeded.

Properties

Gets all horizontal page breaks, which split pages at specific row boundaries.

C#
public IEnumerable<PageBreak> HorizontalPageBreaks { get; }
Property Value:

The horizontal page breaks.

Gets all vertical page breaks, which split pages at specific column boundaries.

C#
public IEnumerable<PageBreak> VerticalPageBreaks { get; }
Property Value:

The vertical page breaks.