Class PivotGridControlBase
Defines the internal Grid control placed under GroupingBar to form a PivotGrid control. It derives from GridControlBase and hence share the basic characteristics of the Grid control.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.Windows.Controls.PivotGrid
Assembly: Syncfusion.PivotAnalysis.WPF.dll
Syntax
public class PivotGridControlBase : GridControlBase, IScrollBarProvider, IScrollInfo, IDisposable, IGridPrintPaginator
Constructors
PivotGridControlBase()
Initializes the PivotGridControlBase class.
Declaration
public PivotGridControlBase()
Fields
GridControlProperty
Identifies the Syncfusion.Windows.Controls.PivotGrid.PivotGridControl.GridControl dependency property.
Declaration
public static readonly DependencyProperty GridControlProperty
Field Value
Type | Description |
---|---|
System.Windows.DependencyProperty | The identifier for the Syncfusion.Windows.Controls.PivotGrid.PivotGridControl.GridControl dependency property. |
Properties
AllowFilter
Gets or sets a value to indicate whether to enable filtering.
Declaration
public bool AllowFilter { get; set; }
Property Value
Type |
---|
System.Boolean |
AutoScrollIncrement
Gets or sets the scroll increment, that controls the amount of scroll, that occurs when you try to drag a column header to a non-visible location, when "RowPivotsOnly" is set to true.
Declaration
public double AutoScrollIncrement { get; set; }
Property Value
Type |
---|
System.Double |
AutoScrollTimerIncrement
Gets or sets the maximum time increment in milliseconds, that occurs between scrolls when you try to drag a column header to a non-visible location, when "RowPivotsOnly" is set to true.
Declaration
public int AutoScrollTimerIncrement { get; set; }
Property Value
Type |
---|
System.Int32 |
ContextMenuTargetColumnIndex
Gets or sets the column index of the column that was clicked when the context-menu was opened.
Declaration
public int ContextMenuTargetColumnIndex { get; set; }
Property Value
Type |
---|
System.Int32 |
GridControl
Gets or sets the PivotGrid control.
Declaration
public PivotGridControl GridControl { get; set; }
Property Value
Type |
---|
PivotGridControl |
HiddenColumnGroups
Gets or sets the different hidden column groups.
Declaration
public List<HiddenGroup> HiddenColumnGroups { get; set; }
Property Value
Type |
---|
System.Collections.Generic.List<HiddenGroup> |
HiddenRowGroups
Gets or sets the different hidden row groups.
Declaration
public List<HiddenGroup> HiddenRowGroups { get; set; }
Property Value
Type |
---|
System.Collections.Generic.List<HiddenGroup> |
HiddenRowIndexes
Contains the row indexes that are hidden through filtering value columns when "RowPivotsOnly" is true.
Declaration
public HashSet<PivotCellInfo> HiddenRowIndexes { get; }
Property Value
Type |
---|
System.Collections.Generic.HashSet<PivotCellInfo> |
ItemSource
Gets the bounded data source.
Declaration
public object ItemSource { get; }
Property Value
Type |
---|
System.Object |
MoveColumnHeaderBackground
Gets or sets brush for column header background.
Declaration
public Brush MoveColumnHeaderBackground { get; set; }
Property Value
Type |
---|
System.Windows.Media.Brush |
MoveColumnHeaderBorder
Gets or sets pen for column header border.
Declaration
public Pen MoveColumnHeaderBorder { get; set; }
Property Value
Type |
---|
System.Windows.Media.Pen |
MoveColumnHeaderForeground
Gets or sets brush for column header foreground.
Declaration
public Brush MoveColumnHeaderForeground { get; set; }
Property Value
Type |
---|
System.Windows.Media.Brush |
PivotEngine
Gets the PivotEngine wired to PivotGrid control.
Declaration
public PivotEngine PivotEngine { get; }
Property Value
Type |
---|
PivotEngine |
SortOption
Gets the sort option for PivotGrid control.
Declaration
public PivotSortOption SortOption { get; }
Property Value
Type |
---|
PivotSortOption |
Methods
add_RowPivotsOnlyContextMenuShowing(RowPivotsOnlyContextMenuShowingEvent)
Declaration
public void add_RowPivotsOnlyContextMenuShowing(RowPivotsOnlyContextMenuShowingEvent value)
Parameters
Type | Name | Description |
---|---|---|
RowPivotsOnlyContextMenuShowingEvent | value |
ApplyFilters()
Uses the contents of “HiddenRowIndexes” to display Pivot results, filtered using calculation values. Previous filters are first cleared. This method only affects the display when "RowPivotsOnly" is set to true.
Declaration
public void ApplyFilters()
ApplyFilters(Boolean)
Uses the contents of “HiddenRowIndexes” to display Pivot results, filtered using calculation values. Any previous filters, optionally cleared, depends upon "clearExisitingFilter" passed. This method only affects the display when "RowPivotsOnly" is set to true.
Declaration
public void ApplyFilters(bool clearExistingFilter)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | clearExistingFilter |
ApplySavedValueFilter(Dictionary<String, HashSet<String>>)
When "RowPivotsOnly" is true, this method filters the value computation columns using the information in the passed-in dictionary.
Declaration
public void ApplySavedValueFilter(Dictionary<string, HashSet<string>> exclusions)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.Dictionary<System.String, System.Collections.Generic.HashSet<System.String>> | exclusions | A dictionary whose keys represent value column mapping names and whose values are HashSets containing strings that should be filtered out of the corresponding column. |
ApplySavedValueSorts(List<String>, List<ListSortDirection>)
When "RowPivotsOnly" is true, this method sorts the Pivot based on the information passed through the arguments.
Declaration
public void ApplySavedValueSorts(List<string> sortedColumns, List<ListSortDirection> listSortDirections)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<System.String> | sortedColumns | The field names for the columns to sort. |
System.Collections.Generic.List<System.ComponentModel.ListSortDirection> | listSortDirections | The corresponding sort orders for the sorted columns. |
ClearFilters()
This method clears the current filter state and optionally re-draws the pivot display.
Declaration
public void ClearFilters()
ClearFilters(Boolean)
This method clears the current filter state and optionally re-draws the pivot display.
Declaration
public void ClearFilters(bool refresh)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | refresh | Returns true, if the pivot display should be re-drawn; otherwise, false. |
ClearHiddenSubtotals(Boolean)
Used to clear hidden sub-totals on the row pivots or column pivots, when the parameter passed is true.
Declaration
public void ClearHiddenSubtotals(bool isRowPivot)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isRowPivot | Indicates whether to clear hidden sub-totals on the row pivots or column pivots. |
ClearValueSorts()
Method used to clear the sorting applied on value cells when "RowPivotsOnly" mode is enabled.
Declaration
public void ClearValueSorts()
CollapseAllGroup()
A method to collapse all PivotItem groups.
Declaration
public void CollapseAllGroup()
ExpandAllGroup()
A method to expand all PivotItem groups.
Declaration
public void ExpandAllGroup()
GetColumnIndexFromName(String)
A method to get the column index in PivotEngine from field name.
Declaration
public int GetColumnIndexFromName(string fieldName)
Parameters
Type | Name | Description |
---|---|---|
System.String | fieldName | Name of the PivotItem. |
Returns
Type | Description |
---|---|
System.Int32 | The column index. |
IsColumnVisible(String)
Returns whether a the column has been hidden using the "SetValueColumnVisibility".
Declaration
public bool IsColumnVisible(string fieldName)
Parameters
Type | Name | Description |
---|---|---|
System.String | fieldName | The field name of the column. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if the column is visible; otherwise, false. |
IsGroupCollapsed(PivotCellInfo, Int32, Boolean, PivotItem)
Returns whether the specified cell is a collapsed cell or expander cell.
Declaration
public bool IsGroupCollapsed(PivotCellInfo info, int index, bool isRowPivot, PivotItem pi)
Parameters
Type | Name | Description |
---|---|---|
PivotCellInfo | info | Cell Information. |
System.Int32 | index | Index of the item. |
System.Boolean | isRowPivot | Boolean value to indicate whether it is row pivot or not. |
PivotItem | pi | PivotItem. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true, if collapsed; otherwise, false. |
LoadPivotInBackground()
Builds a Pivot using the current schema on the background thread, so that the UI thread is responsive.
Declaration
public void LoadPivotInBackground()
MoveValueColumn(Int32, Int32)
When "RowPivotsOnly" is true, use this method to move a calculation column without re-populating the PivotEngine. The underlying grid will be re-drawn during the execution of this method.
Declaration
public void MoveValueColumn(int from, int to)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | from | The index of the old column position. |
System.Int32 | to | The index of the new column position. |
MoveValueColumn(Int32, Int32, Boolean)
When "RowPivotsOnly" is true, this method is used to move a calculation column without re-populating the PivotEngine.
Declaration
public void MoveValueColumn(int from, int to, bool refresh)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | from | The index of the old column position. |
System.Int32 | to | The index of the new column position. |
System.Boolean | refresh | Returns true if you want the underlying grid to re-draw itself. If you are calling MoveValueColumn multiple times to move several columns, then only set refresh to true for the last call. |
OnCellClick(GridCellClickEventArgs)
An overridden method to handle sorting on click over header cells.
Declaration
protected override void OnCellClick(GridCellClickEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
GridCellClickEventArgs | e | The event data. |
Overrides
OnCellMouseUp(GridCellMouseControllerEventArgs)
An overridden method to get clicked mouse button to handle mouse right click at computation header cell.
Declaration
protected override void OnCellMouseUp(GridCellMouseControllerEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
GridCellMouseControllerEventArgs | args | The event data. |
Overrides
OnContextMenuOpening(ContextMenuEventArgs)
An overridden method to handle the visibility of items in the context menu being opened.
Declaration
protected override void OnContextMenuOpening(ContextMenuEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Controls.ContextMenuEventArgs | e | The event data. |
OnCreateAutomationPeer()
returns the new automation peer class for the PivotGridControlBase
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
Type |
---|
System.Windows.Automation.Peers.AutomationPeer |
Overrides
OnGridControlChanged(DependencyObject, DependencyPropertyChangedEventArgs)
Calls when the value of the PivotGrid control changes.
Declaration
public static void OnGridControlChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyObject | dependencyObject | The PivotGrid control. |
System.Windows.DependencyPropertyChangedEventArgs | args | An event argument. |
OnHScrollBarValueChanged(Object, EventArgs)
Handles the ValueChanged event for the horizontal scrollbar.
Declaration
protected override void OnHScrollBarValueChanged(object sender, EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The Internal Grid. |
System.EventArgs | e | An event argument. |
Overrides
OnPreviewKeyDown(KeyEventArgs)
Calls before KeyDown event occurs.
Declaration
protected override void OnPreviewKeyDown(KeyEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.KeyEventArgs | e | An event argument |
Overrides
OnPreviewMouseLeftButtonDown(MouseButtonEventArgs)
Calls before the event MouseLeftButtonDown occurs.
Declaration
protected override void OnPreviewMouseLeftButtonDown(MouseButtonEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.MouseButtonEventArgs | e | An event argument |
OnPreviewMouseMove(MouseEventArgs)
An overridden method to handle mouse movement in prior.
Declaration
protected override void OnPreviewMouseMove(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.MouseEventArgs | e | The event data. |
Overrides
OnPreviewMouseRightButtonUp(MouseButtonEventArgs)
Calls before mouse right button up event occur.
Declaration
protected override void OnPreviewMouseRightButtonUp(MouseButtonEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.MouseButtonEventArgs | e | An event argument. |
OnPreviewMouseUp(MouseButtonEventArgs)
Occurs when any mouse button is released.
Declaration
protected override void OnPreviewMouseUp(MouseButtonEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.MouseButtonEventArgs | e | An event argument |
Overrides
OnQueryCellInfo(GridQueryCellInfoEventArgs)
Raises the QueryCellInfo event.
Declaration
protected override void OnQueryCellInfo(GridQueryCellInfoEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
GridQueryCellInfoEventArgs | e | The GridQueryCellInfoEventArgs instance containing the event data. |
Overrides
OnRender(DrawingContext)
Calls when the cells are rendering.
Declaration
protected override void OnRender(DrawingContext dc)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Media.DrawingContext | dc | DrawingContext. |
Overrides
OnRenderBorder(DrawingContext, Rect, Rect, CellBorderSide, Pen)
Calls when cell border rendering.
Declaration
protected override void OnRenderBorder(DrawingContext dc, Rect cellRect, Rect clipRect, CellBorderSide borderSide, Pen pen)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Media.DrawingContext | dc | The Drawing Context. |
System.Windows.Rect | cellRect | The rectangle of current cell. |
System.Windows.Rect | clipRect | The clipping rectangle for current cell. |
CellBorderSide | borderSide | The border side for current cell. |
System.Windows.Media.Pen | pen | The pen applied tha color for cell. |
Overrides
OnResizingColumns(GridResizingColumnsEventArgs)
Raises the ResizingColumns event.
Declaration
protected override void OnResizingColumns(GridResizingColumnsEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
GridResizingColumnsEventArgs | args | The GridResizingColumnsEventArgs instance containing the event data. |
Overrides
OnResizingRows(GridResizingRowsEventArgs)
Raises the ResizingRows event.
Declaration
protected override void OnResizingRows(GridResizingRowsEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
GridResizingRowsEventArgs | args | The GridResizingRowsEventArgs instance containing the event data. |
Overrides
OnRowPivotsOnlyContextMenuShowing(RowPivotsOnlyContextMenuShowingArgs)
Raises the RowPivotsOnlyContextMenuShowingArgs event.
Declaration
protected void OnRowPivotsOnlyContextMenuShowing(RowPivotsOnlyContextMenuShowingArgs e)
Parameters
Type | Name | Description |
---|---|---|
RowPivotsOnlyContextMenuShowingArgs | e | The RowPivotsOnlyContextMenuShowingArgs instance containing the event data. |
OnVScrollBarValueChanged(Object, EventArgs)
Handles the ValueChanged event for the vertical scrollbar.
Declaration
protected override void OnVScrollBarValueChanged(object sender, EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The Internal Grid. |
System.EventArgs | e | An event argument. |
Overrides
Populate()
This method calls PivotEngine.Populate to construct the underlying Pivot. It does it in a manner such that if both PivotEngine.EnableOnDemandCalculations and PivotEngine.EnableLazyLoadOnDemandCalculations are true, then the summaries are calculated in the background during application idle cycles.
Declaration
public void Populate()
ReapplyFiltersAfterSort()
Used to re-apply the filtering in PivotGrid, after the sorting operation done at PivotGrid when "EnableOnDemandCalculations" is set to true.
Declaration
public void ReapplyFiltersAfterSort()
Refresh(Boolean)
Refreshes this PivotGrid instance. If the parameter value is true, then the refreshing includes re-population of the PivotEngine.
Declaration
public void Refresh(bool shouldPopulateEngine)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | shouldPopulateEngine | A value indicating whether to re-populate PivotEngine. |
remove_RowPivotsOnlyContextMenuShowing(RowPivotsOnlyContextMenuShowingEvent)
Declaration
public void remove_RowPivotsOnlyContextMenuShowing(RowPivotsOnlyContextMenuShowingEvent value)
Parameters
Type | Name | Description |
---|---|---|
RowPivotsOnlyContextMenuShowingEvent | value |
SetValueColumnVisibility(Int32, Boolean)
When "RowPivotsOnly" is true, this method either hides or shows a column at a given column index. The index is the absolute position in the PivotGrid control and may include previously hidden columns in its count.
Declaration
public void SetValueColumnVisibility(int columnIndex, bool isHidden)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | columnIndex | The column index in the Grid (taking into account possible hidden columns). |
System.Boolean | isHidden | Returns true if you want to hide this column, and false if you want to show it. |
SetValueColumnVisibility(String, Boolean)
When "RowPivotsOnly" is true, this method either hides or shows a column, specified by the given mapping name.
Declaration
public void SetValueColumnVisibility(string fieldName, bool isHidden)
Parameters
Type | Name | Description |
---|---|---|
System.String | fieldName | The mapping name associated with the column. |
System.Boolean | isHidden | Returns true if you want to hide this column, and false if you want to show it. |
ShouldRenderCurrentCellBorder()
Hiding the cell border for header cells.
Declaration
protected override bool ShouldRenderCurrentCellBorder()
Returns
Type |
---|
System.Boolean |
Overrides
SubTotalsRendering()
Show/hide the PivotGrid's sub-total based on the "ShowSubTotals" property.
Declaration
public void SubTotalsRendering()
Events
RowPivotsOnlyContextMenuShowing
Event raised prior to a context-menu opening when "RowPivotsOnly" is true.
Declaration
public event RowPivotsOnlyContextMenuShowingEvent RowPivotsOnlyContextMenuShowing
Event Type
Type |
---|
RowPivotsOnlyContextMenuShowingEvent |