Class PivotEngine
Represents the OLAP table in virtual flexible way and provides several useful methods to operate on OLAP table.
Inheritance
Namespace: Syncfusion.Olap.UWP.Engine
Assembly: Syncfusion.Olap.UWP.dll
Syntax
public class PivotEngine : Object, IDisposable, ICloneable<PivotEngine>
Constructors
PivotEngine()
Initializes a new instance of the PivotEngine class.
Declaration
public PivotEngine()
Properties
CoveredCellsRangeInfo
Gets or sets the collection of covered cells' range information.
Declaration
public List<GridRangeInfo> CoveredCellsRangeInfo { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<GridRangeInfo> | The collection of covered cells' range information. |
CrossLevelExpand
Gets or sets a value indicating whether the cross-level expand feature is enabled.
Declaration
public bool CrossLevelExpand { get; set; }
Property Value
Type |
---|
System.Boolean |
DefaultTable
Gets the default pivot table.
Declaration
public static PivotEngine DefaultTable { get; }
Property Value
Type |
---|
PivotEngine |
HeaderSection
Gets or sets the header range information in OLAP table.
Declaration
public GridRangeInfo HeaderSection { get; set; }
Property Value
Type |
---|
GridRangeInfo |
IsOLAP
Gets a value indicating whether the pivot table contains OLAP expandable and structured data.
Declaration
public bool IsOLAP { get; }
Property Value
Type |
---|
System.Boolean |
Item[Int32, Int32]
Gets the PivotCellDescriptor with the specified location.
Declaration
public PivotCellDescriptor this[int rowIndex, int columnIndex] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rowIndex | The rowIndex |
System.Int32 | columnIndex | The columnIndex |
Property Value
Type |
---|
PivotCellDescriptor |
ItemSource
Gets or sets the items source.
Declaration
public object ItemSource { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The items source. |
LevelsHash
Gets the levels hash for the current table.
Declaration
public Dictionary<int, List<int>> LevelsHash { get; }
Property Value
Type |
---|
System.Collections.Generic.Dictionary<System.Int32, System.Collections.Generic.List<System.Int32>> |
ParentEngine
Gets or sets the parent engine.
Declaration
public object ParentEngine { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The parent engine. |
RenderedRows
Gets or sets the list of rendered rows.
Declaration
public List<int> RenderedRows { get; }
Property Value
Type |
---|
System.Collections.Generic.List<System.Int32> |
Reverted
Indicates whether the OLAP table is reverted.
Declaration
public bool Reverted { get; }
Property Value
Type |
---|
System.Boolean |
RowHeaderSection
Gets or sets the row header range information in OLAP table.
Declaration
public GridRangeInfo RowHeaderSection { get; set; }
Property Value
Type | Description |
---|---|
GridRangeInfo | The row header range information. |
RowsCount
Gets the number of rows in the OLAP table.
Declaration
public int RowsCount { get; }
Property Value
Type |
---|
System.Int32 |
SummaryPosition
Gets or sets the summary position in OLAP table.
Declaration
public SummaryLayout SummaryPosition { get; set; }
Property Value
Type |
---|
SummaryLayout |
TableColumns
Gets or sets the collection of child columns.
Declaration
public List<PivotColumnDescriptor> TableColumns { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<PivotColumnDescriptor> | The collection of child columns. |
Methods
ClearLevelHeadersArea()
Clears the top-left area that should be called right before rendering the data.
Declaration
public void ClearLevelHeadersArea()
ClearTable()
Clears the pivot table i.e. removes the empty rows.
Declaration
public void ClearTable()
Clone()
Clones this instance.
Declaration
public PivotEngine Clone()
Returns
Type | Description |
---|---|
PivotEngine | A copy of this instance. |
CreateEngine(Int32, Int32)
Creates the pivot table that is filled with default cell objects.
Declaration
public static PivotEngine CreateEngine(int rowCount, int colCount)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rowCount | Number of rows that should be maintained in the table. |
System.Int32 | colCount | Number of columns that should be maintained in the table. |
Returns
Type | Description |
---|---|
PivotEngine | The created pivot table. |
CreateTableFromRows(List<Int32>)
Creates a new table descriptor form the array of rows numbers.
Declaration
public PivotEngine CreateTableFromRows(List<int> rows)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<System.Int32> | rows | The list of rows's indexes. |
Returns
Type | Description |
---|---|
PivotEngine | The created pivot table. |
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
GetCellData(PivotCellDescriptor)
Gets the details for specified cell.
Declaration
public virtual PivotValueCellData GetCellData(PivotCellDescriptor pivotCell)
Parameters
Type | Name | Description |
---|---|---|
PivotCellDescriptor | pivotCell |
Returns
Type |
---|
PivotValueCellData |
GetCellData(Int32, Int32)
Gets the details for a cell in specified location.
Declaration
public virtual PivotValueCellData GetCellData(int row, int column)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | row | Cell row. |
System.Int32 | column | Cell column |
Returns
Type | Description |
---|---|
PivotValueCellData | Data structure. |
GetCellDataValue(Int32, Int32)
Gets the cell data value.
Declaration
public virtual PivotValueCellData GetCellDataValue(int row, int column)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | row | The index of the row. |
System.Int32 | column | The index of the column. |
Returns
Type |
---|
PivotValueCellData |
GetCellDataValueforIEnumerable(Int32, Int32)
Gets the cell data value for IEnumerable source.
Declaration
public virtual PivotValueCellData GetCellDataValueforIEnumerable(int row, int column)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | row | The index of the row. |
System.Int32 | column | The index of the column. |
Returns
Type |
---|
PivotValueCellData |
GetCellLocation(PivotCellDescriptor)
Returns the cell location.
Declaration
public GridRangeInfo GetCellLocation(PivotCellDescriptor cellDesc)
Parameters
Type | Name | Description |
---|---|---|
PivotCellDescriptor | cellDesc | The cell descriptor. |
Returns
Type | Description |
---|---|
GridRangeInfo | The cell location. |
GetKpiCollection()
Gets the KPIs.
Declaration
public KpiInfoCollection GetKpiCollection()
Returns
Type | Description |
---|---|
KpiInfoCollection | The collection of KPI information. |
GetKpiCollectionAxisMembers()
Gets the axis members of KPIs.
Declaration
public KpiInfoCollection GetKpiCollectionAxisMembers()
Returns
Type | Description |
---|---|
KpiInfoCollection | The collection of KPI information. |
GetRowAt(Int32)
Gets the row at specified index.
Declaration
public PivotRowDescriptor GetRowAt(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index of the row. |
Returns
Type | Description |
---|---|
PivotRowDescriptor | The row that is created. |
Remarks
If the index is incorrect, then the empty row will be returned.
GetRowLevel(Int32)
Gets the level of specified row.
Declaration
public int GetRowLevel(int rowindex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rowindex | The index of the row. |
Returns
Type | Description |
---|---|
System.Int32 | The level. |
GetUpdatedCellLocation(PivotCellDescriptor)
Returns the cell location.
Declaration
public GridRangeInfo GetUpdatedCellLocation(PivotCellDescriptor cellDesc)
Parameters
Type | Name | Description |
---|---|---|
PivotCellDescriptor | cellDesc | The cell descriptor. |
Returns
Type | Description |
---|---|
GridRangeInfo | The cell location. |
GetValidKpiCollection()
Gets the valid KPIs.
Declaration
public KpiInfoCollection GetValidKpiCollection()
Returns
Type | Description |
---|---|
KpiInfoCollection | The collection of KPIs. |
IndexCells()
Indexes the cells of columns and rows in the pivot table.
Declaration
public void IndexCells()
InsertRow(PivotRowDescriptor, Int32)
Inserts the row at specified index.
Declaration
public void InsertRow(PivotRowDescriptor row, int index)
Parameters
Type | Name | Description |
---|---|---|
PivotRowDescriptor | row | The row to be inserted. |
System.Int32 | index | The index at which the row should be inserted. |
MergeKpiRowsWithColumns(KpiInfoCollection)
Merges the KPI rows with columns.
Declaration
public KpiInfoCollection MergeKpiRowsWithColumns(KpiInfoCollection kpiInfoCollection)
Parameters
Type | Name | Description |
---|---|---|
KpiInfoCollection | kpiInfoCollection | The collection of KPI information. |
Returns
Type | Description |
---|---|
KpiInfoCollection | The merged collection of KPI information. |
MergeWrapper(PivotEngine)
Applies all changes of specified wrapper to current wrapper.
Declaration
public void MergeWrapper(PivotEngine tableWrapper)
Parameters
Type | Name | Description |
---|---|---|
PivotEngine | tableWrapper | The wrapper with applied changes. |
MoveRow(Int32, Int32)
Moves the row from current position to new position.
Declaration
public void MoveRow(int currPosition, int newPosition)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | currPosition | The current row position. |
System.Int32 | newPosition | The new row position. |
MoveRow(Int32, Int32, Boolean)
Moves the row from current position to new position.
Declaration
public void MoveRow(int currPosition, int newPosition, bool ignoreSpans)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | currPosition | The current row position. |
System.Int32 | newPosition | The new row position. |
System.Boolean | ignoreSpans | Indicates whether to ignore spans. |
RecalculateColumnHeaderSpans()
Recalculates the column header spans.
Declaration
public void RecalculateColumnHeaderSpans()
RecalculateColumnHeaderSpans(Boolean)
Recalculates the column header spans.
Declaration
public void RecalculateColumnHeaderSpans(bool itemsSource)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | itemsSource | Indicates whether it is items source. |
RecalculateSpans()
Recalculates the spans in the pivot table.
Declaration
public void RecalculateSpans()
RecalculateSpans(Boolean)
Recalculates the spans in the table.
Declaration
public void RecalculateSpans(bool resetHeader)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | resetHeader | Indicates whether to reset the table header spans. |
RecalculateSpans(Int32, Int32, Boolean, GridLayout)
Recalculates the spans if the summary type is specified with IList or DataTable binding.
Declaration
public void RecalculateSpans(int summaryStringCount, int summaryElements, bool rowMeasure, GridLayout gridLayout)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | summaryStringCount | The count of summary string items. |
System.Int32 | summaryElements | The count of summary elements. |
System.Boolean | rowMeasure | Indicates whether it is row measure. |
GridLayout | gridLayout | The grid layout. |
RemoveMeasuresSection()
Removes the measures' section.
Declaration
public void RemoveMeasuresSection()
RemoveRowAt(Int32)
Removes the row at specified index.
Declaration
public void RemoveRowAt(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index of the row. |
RemoveTotalsElements()
Removes the elements that represents totals signs.
Declaration
public void RemoveTotalsElements()
Reset()
Clears the table columns.
Declaration
public void Reset()
ResetSpans()
Resets the spans in the pivot table.
Declaration
public void ResetSpans()
ResetSpansforExcelLayout(Boolean, Boolean)
Resets the span for excel layout.
Declaration
public void ResetSpansforExcelLayout(bool isMeasureEnd, bool isMeasureMiddle)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isMeasureEnd | The bool value. |
System.Boolean | isMeasureMiddle | The bool value. |
RevertTransform()
Transforms the table by changing rows with columns.
Declaration
public PivotEngine RevertTransform()
Returns
Type |
---|
PivotEngine |
SetColumnsSummaryPos(SummaryLayout)
Sets the column summary position.
Declaration
public void SetColumnsSummaryPos(SummaryLayout summaryPos)
Parameters
Type | Name | Description |
---|---|---|
SummaryLayout | summaryPos | The summary position. |
SetExpandableState(PivotEngine)
Sets the expandable states for row header cells in expandable table.
Declaration
public void SetExpandableState(PivotEngine originalTable)
Parameters
Type | Name | Description |
---|---|---|
PivotEngine | originalTable | Original non-expanded table. |
SetExtendedStyles(Member)
Sets the extended styles to the cells.
Declaration
public virtual void SetExtendedStyles(Member expandMember)
Parameters
Type | Name | Description |
---|---|---|
Member | expandMember | The member. |
SetInnerSummaryLayout()
Sets the inner summary layout i.e. the table becomes grouped.
Declaration
public void SetInnerSummaryLayout()
SetRenderingLevel(Int32)
Sets the expandable rendering level initially.
Declaration
public PivotEngine SetRenderingLevel(int level)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | level | The last expanded level. |
Returns
Type |
---|
PivotEngine |
Remarks
Works only if the expandable model is enabled.
SetSummaryRows()
Sets the style to summary cells in the row.
Declaration
public void SetSummaryRows()
Remarks
Summary cells are determined dynamically, depending on the current maximum expand level.
SetTotalsSigns()
Sets the totals signs.
Declaration
public void SetTotalsSigns()
SetTotalsSigns(Boolean)
Sets the totals signs.
Declaration
public void SetTotalsSigns(bool setTotalStyles)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | setTotalStyles | Indicates whether to set styles for totals signs. |
SetTotalsSigns(String)
Sets the totals signs.
Declaration
public void SetTotalsSigns(string summaryPos)
Parameters
Type | Name | Description |
---|---|---|
System.String | summaryPos | The summary position. |
ToggleExpandableState(GridRangeInfo, ExpandableState, List<Int32>)
Toggles the expandable state of the specified cell.
Declaration
public List<int> ToggleExpandableState(GridRangeInfo location, ExpandableState state, List<int> renderedRows)
Parameters
Type | Name | Description |
---|---|---|
GridRangeInfo | location | The cell location in the gird. |
ExpandableState | state | The state of current cell. |
System.Collections.Generic.List<System.Int32> | renderedRows | The list of rows's indexes. |
Returns
Type |
---|
System.Collections.Generic.List<System.Int32> |
ValidateCellTypes(Dictionary<PivotCellDescriptor, GridRangeInfo>)
Checks if the data has OLAP structure, if not cell types will be changed.
Declaration
public void ValidateCellTypes(Dictionary<PivotCellDescriptor, GridRangeInfo> spannedCells)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.Dictionary<PivotCellDescriptor, GridRangeInfo> | spannedCells | The dictionary which contains PivotCellDescriptor and GridRangeInfo |
ValidateExpandLevel(Int32, ExpandableState)
Checks if the expand level is correct and also corrects the specified level if needed.
Declaration
public int ValidateExpandLevel(int level, ExpandableState state)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | level | The level. |
ExpandableState | state | The expandable state to be applied. |
Returns
Type | Description |
---|---|
System.Int32 | The corrected level. |