BaseColumn.HeaderToolTip Property

Gets or sets the column header's tooltip. This is a dependency property.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v20.1.Core.dll

Declaration

public object HeaderToolTip { get; set; }
Public Property HeaderToolTip As Object

Property Value

Type Description
Object

An object that represents the column header's tooltip.

Remarks

A header tooltip contains the column header's text by default. The image below shows a grid column with a modified text in the header tooltip:

ColumnHeaderCustomizationTooltip

Specify the HeaderToolTip property to change the tooltip's text. The following code sample shows how to use this property to specify custom text:

<dxg:GridColumn FieldName="CategoryName" HeaderToolTip="Category"></dxg:GridColumn>

If the HeaderToolTip property is specified, a tooltip is automatically displayed when an end-user hovers the mouse pointer over a column header. Otherwise, a tooltip is displayed for a column header if its caption is clipped.

The image below shows a grid column with a header tooltip that contains an image before the text:

ColumnHeaderCustomizationTooltipTemplate

Specify the BaseColumn.HeaderToolTipTemplate property to add custom content to an individual column's tooltip. Use the DataViewBase.ColumnHeaderToolTipTemplate property to specify a common tooltip template for all the columns in the current GridControl's view. The HeaderToolTip property is the data context (binding source) for these templates.

The following code sample shows how to add an image to a tooltip using the BaseColumn.HeaderToolTipTemplate property:

<dxg:GridColumn FieldName="CategoryName">
   <dxg:GridColumn.HeaderToolTipTemplate>
      <DataTemplate>
         <WrapPanel>                            
            <Image Source="Image.png" Margin="0,0,5,0"></Image>
            <TextBlock Text="{Binding TemplatedParent.DataContext.HeaderCaption, RelativeSource={RelativeSource TemplatedParent}}" />
         </WrapPanel>
      </DataTemplate>
   </dxg:GridColumn.HeaderToolTipTemplate>
</dxg:GridColumn>

Use the BaseColumn.ActualHeaderToolTipTemplate property to obtain a column's current tooltip template.

See Also