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.v24.2.dll
Declaration
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:
- 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.
- 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.)
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:
Data Grid: Unbound Columns
Tree List: Unbound Columns
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.