JavaScript/jQuery PivotGrid Summary Cell
An object exposing methods that manipulate a summary cell and provide access to its neighboring cells.
child(direction, fieldValue)
Gets the child cell in a specified direction.
The child cell.
Use this method for Total and Grand Total cells to get one of the cells, whose value is involved in the calculation of the total value. The image below demonstrates what cell will be returned by the following code.
var targetCell = sourceCell.child("row", 8); //August is the 8th month
This method is opposite to the parent(direction) method.
children(direction)
Gets all child cells in a specified direction.
The direction in which to search for child cells. Can be "row" or "column".
The array of child cells.
This method is a general case of the child(direction, fieldValue) method. It returns all the cells whose values were involved in a calculation of the total value. Use it for Total and Grand Total cells.
field(area)
Gets a pivot grid field that corresponds to the summary cell.
The area from which to get the field: "row", "column", or "data".
The pivot grid field.
If the header items are expanded and the cell belongs to multiple fields, the field of the deepest expanded header item is returned. The image below demonstrates what field will be returned by the following code.
var columnField = sourceCell.field("column");
grandTotal(direction)
Gets a partial Grand Total cell of a row or column.
The direction in which to search for the grand total cell. Can be "row" or "column".
The partial Grand Total cell.
The image below demonstrates what cell will be returned by the following code.
var targetCell = sourceCell.grandTotal("row");
isPostProcessed(field)
Indicates whether the summaryDisplayMode or calculateSummaryValue post-processed the summary value.
true if the summary value was post-processed; otherwise, false.
next(direction)
Gets the cell next to the current one in a specified direction.
The direction in which to search for the next cell. Can be "row" or "column".
The cell next to the current one.
This method is opposite of the prev(direction) method.
next(direction, allowCrossGroup)
Gets the cell next to current in a specified direction.
The cell next to the current one.
This method is opposite of the prev(direction, allowCrossGroup) method.
parent(direction)
Gets the parent cell in a specified direction.
The direction in which to search for the parent cell. Can be "row" or "column".
The parent cell.
This method is opposite of the child(direction, fieldValue) method.
prev(direction)
Gets the cell prior to the current one in a specified direction.
The direction in which to search for the previous cell. Can be "row" or "column".
The cell before the current one.
This method is opposite of the next(direction) method.
prev(direction, allowCrossGroup)
Gets the cell previous to current in a specified direction.
The cell previous to the current one.
This method is opposite to the next(direction, allowCrossGroup) method.
slice(field, value)
Gets the cell located by the path of the source cell with one field value changed.
The target cell.
Use this method when you need to get a cell located by the similar path with one of its components changed. The image below demonstrates what cell will be returned by the following code.
var targetCell = sourceCell.slice("year", 1998);
value(field)
Gets the value of any field associated with the summary cell.
The field value.
value(field, postProcessed)
Gets the value of any field associated with the summary cell.
Pass true to get a value post-processed by summaryDisplayMode or calculateSummaryValue; pass false to get the original summary value.
The field value.
value(postProcessed)
Gets the summary cell value.
Pass true to get a value post-processed by summaryDisplayMode or calculateSummaryValue; pass false to get the original summary value.
The summary cell value.