
Introduces the xamPivotGrid™ control’s Row Header Highlighting feature.
Prerequisite materials to understand this topic.
Row Header Highlighting is an optional feature that enables the user to highlight a grid’s row header along with the entire row’s data cells when selected. This is an option of the row selection feature of the xamPivotGrid.
The benefit of highlighting the row header cell together with the rest of the selected row is that it enhances the visual impact of the displayed data by emphasizing existing groupings and hierarchies in the grid. The following screen shot illustrates just how effective highlighting can be in drawing attention to the cell value and how it relates to the data hierarchy in which it resides.
The Row Header Highlighting option can be toggled between disabled, its default state, and enabled by setting the xamPivotGrid control’s AllowRowHeaderSelection property.
To highlight a row header once it is selected set AllowRowHeaderSelection to True.
In XAML:
AllowRowHeaderSelection="True"
In C#:
this.pivotGrid.SelectionSettings.AllowRowHeaderSelection = true;
In Visual Basic:
Me.pivotGrid.SelectionSettings.AllowRowHeaderSelection = True
To enable the user to highlight the row header along with the rest of the row by selecting it, you will have to add the AllowRowHeaderSelection="True"
declaration to the ig:PivotSelectionSettings
object.
In XAML:
<ig:XamPivotGrid
x:Name="pivotGrid" DataSource="{Binding DataSource}">
<ig:XamPivotGrid.SelectionSettings>
<ig:PivotSelectionSettings
AllowRowHeaderSelection="True"
CellSelection="Single"
CellSelectionAction="SelectRow"
RowSelection="Single" />
</ig:XamPivotGrid.SelectionSettings>
</ig:XamPivotGrid>
In C#:
this.pivotGrid.SelectionSettings.AllowRowHeaderSelection = true;
this.pivotGrid.SelectionSettings.CellSelection = Infragistics.Controls.Grids.PivotSelectionType.Single;
this.pivotGrid.SelectionSettings.CellSelectionAction = Infragistics.Controls.Grids.PivotCellSelectionAction.SelectRow;
this.pivotGrid.SelectionSettings.RowSelection = Infragistics.Controls.Grids.PivotSelectionType.Single;
In Visual Basic:
Me.pivotGrid.SelectionSettings.AllowRowHeaderSelection = True
Me.pivotGrid.SelectionSettings.CellSelection = Infragistics.Controls.Grids.PivotSelectionType.[Single]
Me.pivotGrid.SelectionSettings.CellSelectionAction = Infragistics.Controls.Grids.PivotCellSelectionAction.SelectRow
Me.pivotGrid.SelectionSettings.RowSelection = Infragistics.Controls.Grids.PivotSelectionType.[Single]
The following topics provide additional information related to this topic.