New to Telerik Document ProcessingStart a free 30-day trial

Manages the collection of cell ranges to be printed, allowing multiple non-contiguous areas to be specified for printing.

Definition

Methods

Determines whether the specified range can be added without intersecting with existing print ranges.

C#
public bool CanAddToPrintArea(CellRange range)
Parameters:rangeCellRange

The range.

Returns:

bool

The value indicating wheter the specified range can be added.

Determines whether the specified ranges can be added without intersecting with existing print ranges.

C#
public bool CanAddToPrintArea(IEnumerable<CellRange> ranges)
Parameters:rangesIEnumerable<CellRange>

The ranges.

Returns:

bool

The value indicating wheter the specified ranges can be added.

Removes all print area ranges, reverting to printing the entire used worksheet area.

C#
public void Clear()

Inserts the specified index.

C#
protected override void Insert(int index, CellRange range)
Parameters:indexint

The index.

rangeCellRange

The range.

Overrides: CellRangeInsertedOrRemovedAwareOrderedCollection.Insert(int, CellRange)

Called after translation.

C#
protected override void OnAfterTranslation(Dictionary<CellRange, CellRange> oldAndNewTranslatedRangesPositions, CellRange rangeToInsertOrRemove, ShiftType shiftType)
Parameters:oldAndNewTranslatedRangesPositionsDictionary<CellRange, CellRange>

The old and new translated ranges positions.

rangeToInsertOrRemoveCellRange

The range to insert or remove.

shiftTypeShiftType

Type of the shift.

Overrides: CellRangeInsertedOrRemovedAwareCollectionBase.OnAfterTranslation(Dictionary<CellRange, CellRange>, CellRange, ShiftType)

Called before translation.

C#
protected override void OnBeforeTranslation(Dictionary<CellRange, CellRange> oldAndNewTranslatedRangesPositions, CellRange rangeToInsertOrRemove, ShiftType shiftType)
Parameters:oldAndNewTranslatedRangesPositionsDictionary<CellRange, CellRange>

The old and new translated ranges positions.

rangeToInsertOrRemoveCellRange

The range to insert or remove.

shiftTypeShiftType

Type of the shift.

Overrides: CellRangeInsertedOrRemovedAwareCollectionBase.OnBeforeTranslation(Dictionary<CellRange, CellRange>, CellRange, ShiftType)

Removes the cell range at.

C#
protected override void RemoveCellRangeAt(int index)
Parameters:indexint

The index.

Overrides: CellRangeInsertedOrRemovedAwareOrderedCollection.RemoveCellRangeAt(int)

Replaces all existing print ranges with a single specified range.

C#
public void SetPrintArea(CellRange range)
Parameters:rangeCellRange

The range.

Replaces all existing print ranges with the specified collection of ranges.

C#
public void SetPrintArea(IEnumerable<CellRange> ranges)
Parameters:rangesIEnumerable<CellRange>

The ranges.

Attempts to add a range to the print area if it does not intersect with existing ranges, and returns whether the operation succeeded.

C#
public bool TryAddToPrintArea(CellRange range)
Parameters:rangeCellRange

The range.

Returns:

bool

Attempts to add multiple ranges to the print area if they do not intersect with existing ranges, and returns whether the operation succeeded.

C#
public bool TryAddToPrintArea(IEnumerable<CellRange> ranges)
Parameters:rangesIEnumerable<CellRange>

The ranges.

Returns:

bool

Properties

Gets whether any print area ranges have been defined, indicating that only specific areas will be printed.

C#
public bool HasPrintAreaRanges { get; }
Property Value:

The value indicating whether there are print ranges.

Gets the cell ranges currently configured for printing.

C#
public IEnumerable<CellRange> Ranges { get; }
Property Value:

The ranges to print.