Back to Devexpress

CustomDrawRowHeaderCellEventArgs.AllowHtmlText Property

windowsforms-devexpress-dot-xtraverticalgrid-dot-events-dot-customdrawrowheadercelleventargs.md

latest2.9 KB
Original Source

CustomDrawRowHeaderCellEventArgs.AllowHtmlText Property

Gets or sets whether the row caption can be formatted using HTML tags.

Namespace : DevExpress.XtraVerticalGrid.Events

Assembly : DevExpress.XtraVerticalGrid.v25.2.dll

NuGet Packages : DevExpress.Win.Navigation, DevExpress.Win.VerticalGrid

Declaration

csharp
public bool AllowHtmlText { get; set; }
vb
Public Property AllowHtmlText As Boolean

Property Value

TypeDescription
Boolean

true if the row caption is formatted using HTML tags; otherwise, false.

|

Remarks

The AllowHtmlText event parameter specifies whether the current row caption can be formatted using HTML tags. This property overrides the control’s OptionsView.AllowHtmlText and the row’s VGridOptionsRow.AllowHtmlText properties.

The code snippet below formats a row caption with HTML tags.

csharp
private void vGridControl1_CustomDrawRowHeaderCell(object sender, DevExpress.XtraVerticalGrid.Events.CustomDrawRowHeaderCellEventArgs e) {
    if(e.Caption == "Address") {
        e.Caption = "<b> " + e.Caption + "</b>"; 
        e.AllowHtmlText = true;
    }
}
vb
Private Sub VGridControl1_CustomDrawRowHeaderCell(sender As Object, e As DevExpress.XtraVerticalGrid.Events.CustomDrawRowHeaderCellEventArgs) Handles VGridControl1.CustomDrawRowHeaderCell
    If e.Caption = "Address" Then
        e.Caption = "<b> " + e.Caption + "</b>"
        e.AllowHtmlText = True
    End If
End Sub

See Also

AllowHtmlText

AllowHtmlText

HTML-inspired Text Formatting

CustomDrawRowHeaderCellEventArgs Class

CustomDrawRowHeaderCellEventArgs Members

DevExpress.XtraVerticalGrid.Events Namespace