BaseOptionsView.AllowHtmlText Property

Gets or sets whether row captions are formatted using HTML tags.

Namespace: DevExpress.XtraVerticalGrid

Assembly: DevExpress.XtraVerticalGrid.v20.1.dll

Declaration

[DefaultValue(false)]
[XtraSerializableProperty]
public virtual bool AllowHtmlText { get; set; }
<DefaultValue(False)>
<XtraSerializableProperty>
Public Overridable Property AllowHtmlText As Boolean

Property Value

Type Default Description
Boolean

false

true, if row captions are formatted using HTML tags; otherwise, false.

Property Paths

You can access this nested property as listed below:

Object Type Path to AllowHtmlText
PropertyGridControl
.OptionsView.AllowHtmlText
PropertyGridControl
.OptionsView.AllowHtmlText
VGridControl
.OptionsView.AllowHtmlText
VGridControl
.OptionsView.AllowHtmlText
VGridControlBase
.OptionsView.AllowHtmlText

Remarks

If the Vertical Grid is bound to a data source, row captions are automatically initialized using corresponding data source field names. You can also provide a custom caption for a particular row using the RowProperties.Caption property accessible through the row's EditorRow.Properties object.

The AllowHtmlText property allows you to enable the HTML formatting feature for row captions. This property specifies the global setting for the current Vertical Grid and can be overridden for a particular row using the VGridOptionsRow.AllowHtmlText setting accessible through the row's BaseRow.OptionsRow property. The code below enables HTML formatting, and specifies bold text for a particular row. For the list of supported HTML tags, see HTML Text Formatting.


vGridControl1.OptionsView.AllowHtmlText = true;
rowLastName.Properties.Caption = "<b>Last Name</b>";

See the result below.

VGridOptionsView_AllowHtmlText

Also, you can handle the VGridControlBase.CustomDrawRowHeaderCell event and use the CustomDrawRowHeaderCellEventArgs.AllowHtmlText property to enable this feature for particular row headers according to your logic.

See Also