Syncfusion AI Assistant

How can I help you?

Show tooltip for row and column headers in ASP.NET Core Pivot Table

You can display custom tooltips for row and column headers to provide additional context and information. This approach enhances the user experience by showing detailed field information when hovering over header cells in the pivot table.

Implementation

To display tooltips for row and column headers, initialize an external tooltip component within the Pivot Table’s dataBound event. This ensures the tooltip is created only once, after the Pivot Table has finished rendering and is ready to interact with its elements. The tooltip targets both row and column header elements using specific CSS selectors: td.e-rowsheader for row headers and th.e-columnsheader for column headers.

For row header tooltips, the formatted text and field name of the current row header are retrieved from the pivotValues and displayed in the tooltip. For column header tooltips, the text content of the respective column header element is extracted and displayed directly in the tooltip.

Show tooltip for row and column headers