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

RepositoryItemHypertextLabel Class

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

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v17.2.dll

Declaration

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

Remarks

The RepositoryItemHypertextLabel allows you to format static text within cells in containers (e.g., 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 editor’s repository (EditorContainer.RepositoryItems or ComponentEditorContainer.RepositoryItems). You may also use an external repository to share a repository item between multiple controls. 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 bound controls, you can provide formatted strings at the data source level. If a control supports unbound (calculated) columns, use this feature to dynamically generate formatted strings by handling dedicated events. See the following topics to learn more:

    - Data Grid: Unbound Columns

    - Tree List: Unbound Columns

    Bound controls also provide events to supply custom display text for cells. You can use these events to provide data for the RepositoryItemHypertextLabel. See ColumnView.CustomColumnDisplayText, TreeList.CustomColumnDisplayText and VGridControl.CustomColumnDisplayText.

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.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the RepositoryItemHypertextLabel class.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also