Skip to main content

Hints and Tooltips

  • 2 minutes to read

The PivotGridControl supports hints (tooltips) for field headers, field values, and cells. Hints are displayed if text within an element’s region is clipped.

Customizing Tooltips using Properties

Hints are usually displayed when an end-user hovers the mouse pointer over a visual element (for example, a field header or cell) whose contents are truncated. The image below shows a hint for a truncated field header.

cdHints

 

The Pivot Grid provides a set of options that specify which elements can display hints. To access these options, use the PivotGridControl.OptionsHint property. The table below lists these options and their descriptions.

Option Description
PivotGridOptionsHint.ShowCellHints Specifies whether hints are displayed for cells with truncated content.
PivotGridOptionsHint.ShowHeaderHints Specifies whether hints are displayed for field headers with truncated captions.
PivotGridOptionsHint.ShowValueHints Specifies whether hints are displayed for field values that are truncated.

 

It is also possible to specify custom hints using each field’s PivotGridField.ToolTips property. This property returns the PivotGridFieldToolTips object that allows you to specify the hint that is displayed when you hover over a field’s header and values.

cdHints_field

Note that you can use the Tooltip Controller to manage the tooltips of all DevExpress controls and elements. To learn more, see Tooltip Controller.

Customizing Tooltips using the Event

The PivotGridControl.FieldTooltipShowing event occurs when a tooltip is about to be invoked, for example, when an end-user hovers the mouse over a trimmed caption. This event allows you to cancel invoking the tooltip, or specify the hint’s custom text.

You can define which element is located at particular screen coordinates using the event’s PivotFieldTooltipShowingEventArgs.HitInfo property. See Hit Information to learn more about defining of visual elements.

The following PivotFieldTooltipShowingEventArgs properties provide information specific to this event:

Option Description
PivotFieldTooltipShowingEventArgs.HitInfo Gets information about the point where the tooltip should be invoked.
PivotFieldTooltipShowingEventArgs.Point Gets the coordinates of the point where the tooltip should be invoked.
PivotFieldTooltipShowingEventArgs.ShowTooltip Gets or sets whether to show the tooltip.
PivotFieldTooltipShowingEventArgs.Text Gets or sets the tooltip text.

Customizing Tooltips using the Tooltip Controller

Tooltips can be managed by using the ToolTipController component, which provides the hint settings. It allows you to customize hint appearances, specify icons displayed in hints and set the time interval between invoking/hiding hints, etc. To learn how to use this component, see the Hints and Tooltips section.