Hyperlink Cells in WPF Pivot Grid

15 Jul 20212 minutes to read

The pivot grid allows hyperlinking of cells to retrieve a detailed information about a particular cell. It generates a separate event called HyperLinkCellClick for the clicked hyperlink cell, and the HyperLinkCellClickEventArgs returns the clicked PivotCellInfo.

The Hyperlink Cell property can be applied individually to the following cells:

  • Column header
  • Row header
  • Summary header
  • Summary cell
  • Value cell

Property

  • IsHyperlinkCell: Gets or sets whether to enable or disable the grid cells of pivot grid as hyperlink cells.

Defining the property in pivot grid

You can enable or disable the hyperlink for the cells separately for all row header, column header, summary header, and value cells through the IsHyperlinkCell property. It can be mentioned in code-behind.

  • C#
  • public partial class MainWindow: Window {
        public MainWindow() {
            InitializeComponent();
            // Enabling Column Header cells as Hyperlink cell
            pivotGrid.ColumnHeaderCellStyle.IsHyperlinkCell = true;
            // Enabling Row Header cells as Hyperlink cell
            pivotGrid.RowHeaderCellStyle.IsHyperlinkCell = true;
            // Enabling both Row and Column summary Header cells as Hyperlink cell
            pivotGrid.SummaryHeaderStyle.IsHyperlinkCell = true;
            // Enabling both Row and Column summary cells as Hyperlink cell
            pivotGrid.SummaryCellStyle.IsHyperlinkCell = true;
            // Enabling Value cells as Hyperlink cell
            pivotGrid.ValueCellStyle.IsHyperlinkCell = true;
        }
    }

    PivotGrid with Column header hyperlink
    PivotGrid with Column header hyperlink

    PivotGrid with Row header hyperlink

    PivotGrid with Row header hyperlink

    PivotGrid with Summary cell hyperlink

    PivotGrid with Summary cell hyperlink

    PivotGrid with Summary header hyperlink
    PivotGrid with Summary header hyperlink

    PivotGrid with Value cell hyperlink

    PivotGrid with Value cell hyperlink

    NOTE

    You can refer to our WPF Pivot Grid feature tour page for its groundbreaking feature representations. You can also explore our WPF Pivot Grid example to knows how to organizes and summarizes business data and displays the result in a cross-table format.