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

RepositoryItemHypertextLabel Class

When embedded in a container’s column/cell, allows cell text to be formatted using HTML tags. No editing is supported for these cells.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v19.1.dll

Declaration

[ToolboxBitmap(typeof(ToolboxIconsRootNS), "LabelControl")]
public class RepositoryItemHypertextLabel :
    RepositoryItemButtonEdit

Remarks

The RepositoryItemHypertextLabel allows you to format static text within cells in containers (Data Grid, Tree List, etc.) using a simplified HTML syntax. HTML text formatting is enabled and text editing is disabled when using the RepositoryItemHypertextLabel.

Steps:

  1. Create a RepositoryItemHypertextLabel object and add it to the container’s editor repository (EditorContainer.RepositoryItems or ComponentEditorContainer.RepositoryItems). You may also use an external repository to share a repository item between multiple containers. See PersistentRepository to learn more.
  2. Assign the created RepositoryItemHypertextLabel to a certain column/cell in the container control (e.g., by using the GridColumn.ColumnEdit, TreeListColumn.ColumnEdit, BarEditItem.Edit, etc.)
  3. Provide data for the RepositoryItemHypertextLabel.

    The RepositoryItemHypertextLabel requires a formatted string as an input. For containers bound to a data source, you can provide formatted strings at the data source level. If a container supports unbound (calculated) columns, create an unbound column to dynamically generate formatted strings by handling dedicated events. See the following topics to learn more:

Example

Hyper Text module in the XtraEditors MainDemo

A standalone version of the RepositoryItemHypertextLabel object is HyperlinkLabelControl. Use this control to display static HTML text.

See Also