Skip to main content
A newer version of this page is available.

SnapHyperlink Interface

Provides functionality to insert hyperlinks in Snap documents.

Namespace: DevExpress.Snap.Core.API

Assembly: DevExpress.Snap.v19.1.Core.dll


The following members return SnapHyperlink objects:


A hyperlink’s destination may be a web page, file, or specific position within a document.


Click the Hyperlink icon-small-toolbar-insert-hyperlink button in the General Tools: Insert toolbar tab to create a hyperlink in the User Interface.

The invoked Insert Hyperlink dialog allows you to create a hyperlink and specify its text, screen tip and destination.


To display a field‘s data as hyperlinks, Select the field and click the Properties button in the Data Tools: Field toolbar tab. Expand the Content Type drop-down menu and select Hyperlink.


You can also set the SnapHyperlink.ScreenTip and SnapHyperlink.Target properties of a hyperlink.

Use the ISnapFieldOwner.CreateSnHyperlink method to create a SNHYPERLINK field in code, as shown below:

SnapHyperlink hyperlink = snapControl1.Document.CreateSnHyperlink(snapControl1.Document.Range.Start, "Fish.Fish_ScientificClassification.Reference");
hyperlink.DisplayField = "Fish.CommonName";
hyperlink.ScreenTip = "Wikipedia Page";

Field Result in Case of Empty Data Entry

The SNHYPERLINK field can be bound to a data field name (the SnapSingleListItemEntity.DataFieldName property) and to a display name (the SnapHyperlink.DisplayField property).

You can use SnapSingleListItemEntity.EnableEmptyFieldDataAlias property to use an alternative field result (the SnapSingleListItemEntity.EmptyFieldDataAlias value) if the data source entry bound as the DataFieldName value is empty.

The table below shows SNHYPERLINK field result in different empty data source scenarios:

DataFieldName Data Source

DisplayField Data Source

Field Result

Empty data source (no data source entries or objects in the list)


The data source does not contain the required entry


The SnapSingleListItemEntity.EmptyFieldDataAlias value if specified; otherwise, the DisplayField value.

Not Specified


Set to an invalid data entry


The required data entry returns an empty string.


The SnapSingleListItemEntity.EmptyFieldDataAlias value, if specified; otherwise, the DisplayField value.

Not Specified


Set to an invalid data entry


The data source contains the required entry.

The required data entry is null, DBNull.Value or string.Empty


Not Specified

The data source does not contain the required entry.

(the SnapSingleListItemEntity.EnableEmptyFieldDataAlias value is ignored).

See Also