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 HyperlinkCollection

Manages hyperlinks attached to cell ranges in a worksheet, tracking links through insert/remove operations.

Inheritance
System.Object
CellRangeInsertedOrRemovedAwareCollectionBase
CellRangeInsertedOrRemovedAwareCollection<SpreadsheetHyperlink>
HyperlinkCollection
Inherited Members
CellRangeInsertedOrRemovedAwareCollection<SpreadsheetHyperlink>.TranslateRange(CellRange, CellRange)
CellRangeInsertedOrRemovedAwareCollection<SpreadsheetHyperlink>.GetEnumerator()
CellRangeInsertedOrRemovedAwareCollection<SpreadsheetHyperlink>.IEnumerable.GetEnumerator()
CellRangeInsertedOrRemovedAwareCollection<SpreadsheetHyperlink>.Count
CellRangeInsertedOrRemovedAwareCollection<SpreadsheetHyperlink>.Worksheet
CellRangeInsertedOrRemovedAwareCollection<SpreadsheetHyperlink>.CellRanges
CellRangeInsertedOrRemovedAwareCollection<SpreadsheetHyperlink>.Elements
CellRangeInsertedOrRemovedAwareCollectionBase.CanInsertOrRemove(ShiftType, CellRange, CellRange)
CellRangeInsertedOrRemovedAwareCollectionBase.ShouldTranslateUpDown(RangeType)
CellRangeInsertedOrRemovedAwareCollectionBase.ShouldTranslateLeftRight(RangeType)
CellRangeInsertedOrRemovedAwareCollectionBase.TranslateRanges(Dictionary<CellRange, CellRange>)
CellRangeInsertedOrRemovedAwareCollectionBase.OnBeforeTranslation(Dictionary<CellRange, CellRange>, CellRange, ShiftType)
CellRangeInsertedOrRemovedAwareCollectionBase.OnAfterTranslation(Dictionary<CellRange, CellRange>, CellRange, ShiftType)
CellRangeInsertedOrRemovedAwareCollectionBase.Cells
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 HyperlinkCollection : CellRangeInsertedOrRemovedAwareCollection<SpreadsheetHyperlink>, IEnumerable<SpreadsheetHyperlink>, IEnumerable

Constructors

HyperlinkCollection(Worksheet)

Initializes a new HyperlinkCollection for the specified worksheet.

Declaration
public HyperlinkCollection(Worksheet worksheet)
Parameters
Worksheet worksheet

The worksheet.

Methods

Add(CellIndex, HyperlinkInfo)

Adds a hyperlink to the specified cell and returns the created hyperlink instance.

Declaration
public SpreadsheetHyperlink Add(CellIndex cellIndex, HyperlinkInfo hyperlinkInfo)
Parameters
CellIndex cellIndex

Index of the cell.

HyperlinkInfo hyperlinkInfo

The hyperlink info.

Returns
SpreadsheetHyperlink

The new hyperlink.

Add(CellRange, HyperlinkInfo)

Adds a hyperlink to the specified cell range, replacing any existing hyperlink in that exact range, and applies hyperlink styling.

Declaration
public SpreadsheetHyperlink Add(CellRange cellRange, HyperlinkInfo hyperlinkInfo)
Parameters
CellRange cellRange

The cell range.

HyperlinkInfo hyperlinkInfo

The hyperlink info.

Returns
SpreadsheetHyperlink

The new hyperlink.

Add(CellRange, SpreadsheetHyperlink)

Adds the specified element when cellRange is inserted.

Declaration
protected override SpreadsheetHyperlink Add(CellRange cellRange, SpreadsheetHyperlink element)
Parameters
CellRange cellRange

The cell range.

SpreadsheetHyperlink element

The element.

Returns
SpreadsheetHyperlink

Overrides
Telerik.Windows.Documents.Spreadsheet.Model.CellRangeInsertedOrRemovedAwareCollection<Telerik.Windows.Documents.Spreadsheet.Model.SpreadsheetHyperlink>.Add(Telerik.Windows.Documents.Spreadsheet.Model.CellRange, Telerik.Windows.Documents.Spreadsheet.Model.SpreadsheetHyperlink)

Contains(SpreadsheetHyperlink)

Checks whether the specified hyperlink exists in the collection by range equality.

Declaration
public bool Contains(SpreadsheetHyperlink hyperlink)
Parameters
SpreadsheetHyperlink hyperlink

The hyperlink.

Returns
System.Boolean

A value indicating whether the collection contains the specified hyperlink.

GetContainingHyperlinks(IEnumerable<CellRange>)

Finds all hyperlinks whose ranges are fully contained within any of the specified cell ranges.

Declaration
public IEnumerable<SpreadsheetHyperlink> GetContainingHyperlinks(IEnumerable<CellRange> cellRanges)
Parameters
System.Collections.Generic.IEnumerable<CellRange> cellRanges

The cell ranges.

Returns
System.Collections.Generic.IEnumerable<SpreadsheetHyperlink>

The collection of contained hyperlinks.

GetContainingHyperlinks(CellRange)

Finds all hyperlinks whose ranges are fully contained within the specified cell range.

Declaration
public IEnumerable<SpreadsheetHyperlink> GetContainingHyperlinks(CellRange cellRange)
Parameters
CellRange cellRange

The cell range.

Returns
System.Collections.Generic.IEnumerable<SpreadsheetHyperlink>

The collection of contained hyperlinks.

GetIntersectingHyperlinks(CellRange)

Finds all hyperlinks whose ranges overlap with the specified cell range.

Declaration
public IEnumerable<SpreadsheetHyperlink> GetIntersectingHyperlinks(CellRange cellRange)
Parameters
CellRange cellRange

The cell range.

Returns
System.Collections.Generic.IEnumerable<SpreadsheetHyperlink>

The collection of intersecting hyperlinks.

OnChanged()

Called when the collection is changed.

Declaration
protected virtual void OnChanged()

Remove(CellRange)

Removes elements when cellRange is removed.

Declaration
protected override bool Remove(CellRange cellRange)
Parameters
CellRange cellRange

The cell range.

Returns
System.Boolean

Overrides
Telerik.Windows.Documents.Spreadsheet.Model.CellRangeInsertedOrRemovedAwareCollection<Telerik.Windows.Documents.Spreadsheet.Model.SpreadsheetHyperlink>.Remove(Telerik.Windows.Documents.Spreadsheet.Model.CellRange)

Remove(SpreadsheetHyperlink)

Removes the specified hyperlink and reverts its cells to default styling.

Declaration
public bool Remove(SpreadsheetHyperlink hyperlink)
Parameters
SpreadsheetHyperlink hyperlink

The hyperlink.

Returns
System.Boolean

The value indicating whether the remove was successful.

TryGetHyperlink(CellIndex, out SpreadsheetHyperlink)

Attempts to find any hyperlink intersecting the specified cell, returning the last one if multiple exist.

Declaration
public bool TryGetHyperlink(CellIndex cellIndex, out SpreadsheetHyperlink hyperlink)
Parameters
CellIndex cellIndex

Index of the cell.

SpreadsheetHyperlink hyperlink

The hyperlink.

Returns
System.Boolean

The value indicating whether a hyperlink was found.

TryGetHyperlink(CellRange, out SpreadsheetHyperlink)

Attempts to find any hyperlink intersecting the specified cell range, returning the last one if multiple exist.

Declaration
public bool TryGetHyperlink(CellRange cellRange, out SpreadsheetHyperlink hyperlink)
Parameters
CellRange cellRange

The cell range.

SpreadsheetHyperlink hyperlink

The hyperlink.

Returns
System.Boolean

The value indicating whether a hyperlink was found.

TryGetHyperlinkExact(CellRange, out SpreadsheetHyperlink)

Attempts to find a hyperlink with a range that exactly matches the specified cell range.

Declaration
public bool TryGetHyperlinkExact(CellRange cellRange, out SpreadsheetHyperlink hyperlink)
Parameters
CellRange cellRange

The cell range.

SpreadsheetHyperlink hyperlink

The hyperlink.

Returns
System.Boolean

The value indicating whether a hyperlink was found.

Events

Changed

Raised after a hyperlink is added or removed from the collection.

Declaration
public event EventHandler Changed
Event Type
System.EventHandler

Extension Methods

CommonExtensions.ContainsAny<T>(IEnumerable<T>, IEnumerable<T>)
CommonExtensions.ForEach<T>(IEnumerable<T>, Action<T>)
CommonExtensions.Clone<T>(IEnumerable<T>)
ExtensionMethodsEditor.CastCovariant<TFrom, TTo>(IEnumerable<TFrom>)
SvgExtentions.Traverse<T>(IEnumerable<T>, Func<T, IEnumerable<T>>)
SvgExtentions.Traverse<T>(T, Func<T, IEnumerable<T>>)
SvgExtentions.TraverseDepthFirst<T>(IEnumerable<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.