PivotFieldSortSetting
PivotFieldSortSetting class
Represents the setting for sorting pivot fields.
class PivotFieldSortSetting;
Properties
| Property | Type | Description |
|---|---|---|
| sortType | SortOrder | Represents the SortOrder. |
| isSortByLabels | boolean | Readonly. Indicates whether to sort the field by itself or data field. |
| fieldIndex | number | Represents the index of the field sorted by. -1 means sorting the PivotField by the labels,others means sorting by the data field. |
| sortBy | number | Represents the index of the field sorted by. A value of -1 indicates sorting by the pivot item’s own values. When greater than or equal to zero, it represents the index of data field in the data region. |
| lineTypeSortedBy | PivotLineType | Readonly. The pivot line type sorted by. |
| isSimpleSort | boolean | Indicates whether a simple data sort operation will be applied. |
| cell | string | Readonly. Sorts by the values in which row or column. |
Methods
| Method | Description |
|---|---|
| getSortType() | @deprecated. Please use the ‘sortType’ property instead. Represents the SortOrder. |
| setSortType(SortOrder) | @deprecated. Please use the ‘sortType’ property instead. Represents the SortOrder. |
| isSortByLabels() | @deprecated. Please use the ‘isSortByLabels’ property instead. Indicates whether to sort the field by itself or data field. |
| getFieldIndex() | @deprecated. Please use the ‘fieldIndex’ property instead. Represents the index of the field sorted by. -1 means sorting the PivotField by the labels,others means sorting by the data field. |
| setFieldIndex(number) | @deprecated. Please use the ‘fieldIndex’ property instead. Represents the index of the field sorted by. -1 means sorting the PivotField by the labels,others means sorting by the data field. |
| getSortBy() | @deprecated. Please use the ‘sortBy’ property instead. Represents the index of the field sorted by. A value of -1 indicates sorting by the pivot item’s own values. When greater than or equal to zero, it represents the index of data field in the data region. |
| setSortBy(number) | @deprecated. Please use the ‘sortBy’ property instead. Represents the index of the field sorted by. A value of -1 indicates sorting by the pivot item’s own values. When greater than or equal to zero, it represents the index of data field in the data region. |
| getLineTypeSortedBy() | @deprecated. Please use the ’lineTypeSortedBy’ property instead. The pivot line type sorted by. |
| isSimpleSort() | @deprecated. Please use the ‘isSimpleSort’ property instead. Indicates whether a simple data sort operation will be applied. |
| setIsSimpleSort(boolean) | @deprecated. Please use the ‘isSimpleSort’ property instead. Indicates whether a simple data sort operation will be applied. |
| getCell() | @deprecated. Please use the ‘cell’ property instead. Sorts by the values in which row or column. |
| isNull() | Checks whether the implementation object is null. |
sortType
Represents the SortOrder.
sortType : SortOrder;
isSortByLabels
Readonly. Indicates whether to sort the field by itself or data field.
isSortByLabels : boolean;
fieldIndex
Represents the index of the field sorted by. -1 means sorting the PivotField by the labels,others means sorting by the data field.
fieldIndex : number;
Remarks
NOTE: This property is now obsolete. Instead, please use PivotFieldSortSetting.SortBy property instead. This method will be removed 12 months later since September 2026. Aspose apologizes for any inconvenience you may have experienced.
sortBy
Represents the index of the field sorted by. A value of -1 indicates sorting by the pivot item’s own values. When greater than or equal to zero, it represents the index of data field in the data region.
sortBy : number;
lineTypeSortedBy
Readonly. The pivot line type sorted by.
lineTypeSortedBy : PivotLineType;
Remarks
Only works when not sorting this field by labels.
isSimpleSort
Indicates whether a simple data sort operation will be applied.
isSimpleSort : boolean;
Remarks
The default value is true.
cell
Readonly. Sorts by the values in which row or column.
cell : string;
getSortType()
@deprecated. Please use the ‘sortType’ property instead. Represents the SortOrder.
getSortType() : SortOrder;
Returns
setSortType(SortOrder)
@deprecated. Please use the ‘sortType’ property instead. Represents the SortOrder.
setSortType(value: SortOrder) : void;
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | SortOrder | The value to set. |
isSortByLabels()
@deprecated. Please use the ‘isSortByLabels’ property instead. Indicates whether to sort the field by itself or data field.
isSortByLabels() : boolean;
getFieldIndex()
@deprecated. Please use the ‘fieldIndex’ property instead. Represents the index of the field sorted by. -1 means sorting the PivotField by the labels,others means sorting by the data field.
getFieldIndex() : number;
Remarks
NOTE: This property is now obsolete. Instead, please use PivotFieldSortSetting.SortBy property instead. This method will be removed 12 months later since September 2026. Aspose apologizes for any inconvenience you may have experienced.
setFieldIndex(number)
@deprecated. Please use the ‘fieldIndex’ property instead. Represents the index of the field sorted by. -1 means sorting the PivotField by the labels,others means sorting by the data field.
setFieldIndex(value: number) : void;
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | number | The value to set. |
Remarks
NOTE: This property is now obsolete. Instead, please use PivotFieldSortSetting.SortBy property instead. This method will be removed 12 months later since September 2026. Aspose apologizes for any inconvenience you may have experienced.
getSortBy()
@deprecated. Please use the ‘sortBy’ property instead. Represents the index of the field sorted by. A value of -1 indicates sorting by the pivot item’s own values. When greater than or equal to zero, it represents the index of data field in the data region.
getSortBy() : number;
setSortBy(number)
@deprecated. Please use the ‘sortBy’ property instead. Represents the index of the field sorted by. A value of -1 indicates sorting by the pivot item’s own values. When greater than or equal to zero, it represents the index of data field in the data region.
setSortBy(value: number) : void;
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | number | The value to set. |
getLineTypeSortedBy()
@deprecated. Please use the ’lineTypeSortedBy’ property instead. The pivot line type sorted by.
getLineTypeSortedBy() : PivotLineType;
Returns
Remarks
Only works when not sorting this field by labels.
isSimpleSort()
@deprecated. Please use the ‘isSimpleSort’ property instead. Indicates whether a simple data sort operation will be applied.
isSimpleSort() : boolean;
Remarks
The default value is true.
setIsSimpleSort(boolean)
@deprecated. Please use the ‘isSimpleSort’ property instead. Indicates whether a simple data sort operation will be applied.
setIsSimpleSort(value: boolean) : void;
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | boolean | The value to set. |
Remarks
The default value is true.
getCell()
@deprecated. Please use the ‘cell’ property instead. Sorts by the values in which row or column.
getCell() : string;
isNull()
Checks whether the implementation object is null.
isNull() : boolean;