windowsforms-devexpress-dot-xtragrid-dot-views-dot-grid-dot-gridoptionsview-86952c24.md
Gets or sets whether to parse HTML-inspired tags in tab captions. This option must be applied to the master view.
Namespace : DevExpress.XtraGrid.Views.Grid
Assembly : DevExpress.XtraGrid.v25.2.dll
NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation
[DefaultValue(false)]
[XtraSerializableProperty]
public virtual bool AllowHtmlDrawDetailTabs { get; set; }
<DefaultValue(False)>
<XtraSerializableProperty>
Public Overridable Property AllowHtmlDrawDetailTabs As Boolean
| Type | Default | Description |
|---|---|---|
| Boolean | false |
true to parse HTML-tags in tab captions; otherwise, false.
|
You can access this nested property as listed below:
| Object Type | Path to AllowHtmlDrawDetailTabs |
|---|---|
| GridView |
.OptionsView .AllowHtmlDrawDetailTabs
|
A detail view’s ViewCaption property allows you to specify a caption that is displayed in a detail tab. Ensure that the ShowDetailTabs option is enabled; otherwise, tabs are not displayed. If the EnableDetailToolTip option is enabled, this caption is also displayed in detail tooltips.
If the caption is not specified, the detail view uses the LevelName property value.
You can enable the master view’s AllowHtmlDrawDetailTabs option to parse HTML-inspired tags in detail tab captions.
The DetailTabStyle event fires for each detail view. This event allows you to assign a custom image to the processed tab and apply custom appearance settings to the tab caption.
Use the Caption event argument to obtain or change the processed tab caption. The following arguments allow you to specify the tab style:
You can also use the IsSelected argument to apply a specific style depending on whether the tab is selected.
The RefreshDetailTab(Int32) method allows you to update a detail tab at runtime.
The code below uses HTML-inspired tags to insert an image in a tab. In the figure below, an icon is displayed to the right of the Products tab caption.
// Use the master view to enable HTML tags and specify an image collection.
advBandedGridView1.OptionsView.AllowHtmlDrawDetailTabs = true;
advBandedGridView1.HtmlImages = svgImageCollection1;
void advBandedGridView1_DetailTabStyle(object sender, DetailTabStyleEventArgs e) {
if (e.Caption == "Products") {
e.Caption = "Products <image=product;size=16,16>";
}
if (e.Caption == "Category") {
e.Appearance.Header.ForeColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Success;
e.ImageOptions.SvgImage = svgImageCollection1["category"];
}
}
' Use the master view to enable HTML tags and specify an image collection.
advBandedGridView1.OptionsView.AllowHtmlDrawDetailTabs = True
advBandedGridView1.HtmlImages = svgImageCollection1
Private Sub advBandedGridView1_DetailTabStyle(ByVal sender As Object, ByVal e As DetailTabStyleEventArgs)
If Equals(e.Caption, "Products") Then
e.Caption = "Products <image=product;size=16,16>"
End If
If Equals(e.Caption, "Category") Then
e.Appearance.Header.ForeColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Success
e.ImageOptions.SvgImage = svgImageCollection1("category")
End If
End Sub
See Also