Class IndexEngine
Index Engine is used to load the collection of data faster than the PivotEngine. It makes use of the "EnableOnDemandCalculations" property. Unlike the PivotEngine, it loads the entire collection of data by including all the values in the list irrespective of Row and Column headers.
Inheritance
Namespace: Syncfusion.XlsIO.Implementation.PivotAnalysis
Assembly: Syncfusion.XlsIO.NET.dll
Syntax
public class IndexEngine : Object
Constructors
IndexEngine()
Initializes a new instance of the IndexEngine class.
Declaration
public IndexEngine()
IndexEngine(PivotEngine)
Initializes a new instance of the class IndexEngine.
Declaration
public IndexEngine(PivotEngine pivotEngine)
Parameters
Type | Name | Description |
---|---|---|
PivotEngine | pivotEngine | The PivotEngine. |
IndexEngine(PivotEngine, GetValueDelegate)
Initializes the new instance of the class IndexEngine.
Declaration
public IndexEngine(PivotEngine pivotEngine, GetValueDelegate del)
Parameters
Type | Name | Description |
---|---|---|
PivotEngine | pivotEngine | The PivotEngine. |
GetValueDelegate | del | Returns delegate value. |
Properties
ColumnCount
Gets the number of columns in the Pivot.
Declaration
public int ColumnCount { get; }
Property Value
Type |
---|
System.Int32 |
ColumnOffSetToValues
Gets the number of columns that holds the row header information to the left of the numerical values in the Pivot.
Declaration
public int ColumnOffSetToValues { get; }
Property Value
Type |
---|
System.Int32 |
CoveredRanges
Gets a list of CoveredCellRange objects that specify the cells that need to be covered.
Declaration
public List<CoveredCellRange> CoveredRanges { get; }
Property Value
Type |
---|
System.Collections.Generic.List<CoveredCellRange> |
DataSource
Gets or sets data source for this PivotTable. This object should be either an IEnumerable List, or a DataTable.
Declaration
public object DataSource { get; set; }
Property Value
Type |
---|
System.Object |
Filters
Gets a list holding FilterExpression values that specify any filter that need to be applied to this PivotTable.
Declaration
public List<FilterExpression> Filters { get; }
Property Value
Type |
---|
System.Collections.Generic.List<FilterExpression> |
GetValue
Gets or sets a GetValueDelegate delegate that returns a property value for a given object.
Declaration
public GetValueDelegate GetValue { get; set; }
Property Value
Type |
---|
GetValueDelegate |
Remarks
If this member is null, the IndexEngine will use reflection to obtain property values from objects in the DataSource. Note usually, a well written delegate can provide values more efficiently than using reflection. For performance improvements, you will want to provide a well written delegate for this property.
HighRowLevel
Gets the index of the last row that has been loaded when you are using on-demand loading.
Declaration
public int HighRowLevel { get; }
Property Value
Type |
---|
System.Int32 |
Remarks
You do on-demand loading by passing a true value when you use the IndexEngine method to populate the IndexEngine. When this is done, IndexEngine will return after loading the number of rows indicated Syncfusion.XlsIO.Implementation.PivotAnalysis.IndexEngine.initialRowLoadAmount. The rest of the rows will be populated on-demand as your code requests a row higher than this property.
InitialRowLoadAmount
Gets or sets the number of rows that are initially loaded when you are using on-demand loading.
Declaration
public int InitialRowLoadAmount { get; set; }
Property Value
Type |
---|
System.Int32 |
Remarks
You do on-demand loading by passing a true value when you use the IndexEngine method to populate the IndexEngine. When this is done, IndexEngine will return after loading the number of rows indicated by this property. The rest of the rows will be populated on-demand as your code requests a row higher than HighRowLevel.
Item[Int32, Int32]
Gets the PivotCell information that holds the details being displayed by the Pivot at the given row and column.
Declaration
public PivotCellInfo this[int row, int col] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | row | The row index (zero-based). |
System.Int32 | col | The column index (zero-based). |
Property Value
Type | Description |
---|---|
PivotCellInfo | The PivotCellInfo associated with the cell pointed to by the row and column. |
Remarks
Note that this indexer will return a null value if the row and column values pick out a cell that is not visible due to being part of a covered cell.
PivotCalculations
Gets the PivotCalculations used in this Pivot.
Declaration
public List<PivotComputationInfo> PivotCalculations { get; }
Property Value
Type |
---|
System.Collections.Generic.List<PivotComputationInfo> |
Remarks
If the IndexEngine is created using a PivotEngine, then this PivotCalculations is the PivotEngine. PivotCalculations collection from the associated PivotEngine.
PivotColumns
Gets the PivotColumns used in this Pivot.
Declaration
public List<PivotItem> PivotColumns { get; }
Property Value
Type |
---|
System.Collections.Generic.List<PivotItem> |
PivotRows
Gets the PivotRows used in this Pivot.
Declaration
public List<PivotItem> PivotRows { get; }
Property Value
Type |
---|
System.Collections.Generic.List<PivotItem> |
RowCount
Gets the number of rows in the Pivot.
Declaration
public int RowCount { get; }
Property Value
Type |
---|
System.Int32 |
RowOffSetToValues
Gets the number of rows that holds the column header information above the numerical values in the Pivot.
Declaration
public int RowOffSetToValues { get; }
Property Value
Type |
---|
System.Int32 |
SortDirection
Gets or sets the sorting direction of the items in the Pivot control.
Declaration
public ListSortDirection SortDirection { get; }
Property Value
Type |
---|
System.ComponentModel.ListSortDirection |
UsePercentageFormat
Gets or sets whether the formatted text of the columns which has percentage calculation type, must be applied with given format or default percentage format #,##%
Declaration
public bool UsePercentageFormat { get; set; }
Property Value
Type |
---|
System.Boolean |
Methods
IndexData()
Call this method to have the IndexEngine create the index information for the current content reflected in DataSource, PivotRows, PivotColumns and PivotCalculations.
Declaration
public bool IndexData()
Returns
Type | Description |
---|---|
System.Boolean | Returns true if indexing was completed; otherwise, false. |
Remarks
After successfully executing this method, you can access the Pivot contents using an zero-based row, column indexer on this IndexEngine.
IndexData(Boolean)
Call this method to have the IndexEngine create index information for the current content reflected in DataSource, PivotRows, PivotColumns and PivotCalculations.
Declaration
public bool IndexData(bool onDemand)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | onDemand | If you want this method to return before all the rows are populated, parameter should be set to true. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if indexing was completed; otherwise, false. |
Remarks
If onDemand is true, the IndexEngine will return when the number of rows given in InitialRowLoadAmount has been loaded. After this method returns, the rest of the rows will be loaded on demand as you index this IndexEngine using row and column indexes. Anytime you index this IndexEngine, if your row request exceeds HighRowLevel, additional rows are populated until it is possible to return your requested value.
SortByCalculation(Int32)
Sorts the value by the calculated value.
Declaration
public void SortByCalculation(int colIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | colIndex | The index of the column. |