TV class (Pivot)

TV(oPivot)

new TV(oPivot)

Defines additional properties and methods of the TV type (tree view).
Parameters:
Name Type Description
oPivot Pivot Specifies an object of Pivot type that defines the owner control of the view to be created
TV

Methods

GetDisplayPivotFields() → {number}

The GetDisplayPivotFields() method specifies the maximum number of columns to be displayed on the control's list
Returns:
Returns the number of maximum columns to be added during the execution of the current layout.
Type
number
GetDisplayPivotFields

GetDisplayPivotRows() → {number}

The GetDisplayPivotRows() method specifies the maximum number of rows to be displayed on the control's list
Returns:
Returns the number of maximum rows to be added during the execution of the current layout.
Type
number
GetDisplayPivotRows

GetFormatPivotHeader() → {string}

The GetFormatPivotHeader() method specifies the format to display the columns within the pivot bar
Returns:
Returns the format to display the columns within the pivot bar

The formatPivotHeader property supports the following keywords:

aggregate {string}, specifies the name of the aggregate-function associated with the column, or empty, for pivot-rows columns
ilevel {number}, indicates the index of the level where the aggregate-function is shown. This is valid for total-rows only, else it is -1
caption {string}, indicates the original-caption of the column
icaption {number}, specifies the index of the column
display {number}, specifies whether the caption is shown on the control's pivot bar (0), or in the columns header(1)
Type
string
GetFormatPivotHeader

GetPivotBarVisible() → {Pivot.PivotBarVisibleEnum}

The GetPivotBarVisible() method specifies whether the control's pivot-bar is visible or hidden.
Returns:
Specifies whether the pivot-columns window is visible or hidden. The PivotBarVisibleEnum type supports the following values:
  • exPivotBarHidden(0), the pivot bar is hidden.
  • exPivotBarVisible(1), the pivot bar is visible. include or exclude this flag to show or hide the pivot bar.
  • exPivotBarSizable(2), the pivot bar is sizable. Include or exclude this flag to allow or prevent resizing the pivot bar at runtime. If this flag is present, the user can resize the pivot bar by dragging the bottom side of the control. The resize cursor is shown when the pivot bar is resizable and cursor hovers the bottom side of the pivot bar.
  • exPivotBarFloat(4), the pivot bar is shown into a floating window. Include this flag, to display the pivot bar to a separate window (a floating panel)
  • exPivotBarAutoFit(8), the pivot bar's size is updated automatically so all elements fits the client area (When this flag is present, the height of the pivot's bar is automatically adjusted so the entire content fits the header).
  • exPivotBarShowTotals(16), the pivot bar shows the total/sub-total fields. Include or exclude this flag to show or hide the Total field in the pivot bar.
  • exPivotBarAutoHide(32), shows the pivotbar as soon as the cursor hovers it, and hides it as soon as the cursor leaves it
  • exPivotBarAllowValues(64), specifies if the user can drop values of the columns to the pivot bar.
  • exPivotBarAllowFormatAppearance(128), specifies if the user can select a different appearance for columns or total/subtotal fields.
  • exPivotBarAllowFormatConditionalAppearance(0x1000000), specifies if the user can select conditional appearance for columns.
  • exPivotBarAllowFormatContent(256), specifies if the user can select the way the column's data is displayed.
  • exPivotBarAutoUpdate(512), indicates whether the control' list (pivot-table) is automatically updated once the user drops objects in the pivot bar. Exclude this flag from the pivotBarVisible property, and so the Refresh button is shown in the bottom side of the control, and the changes will be applied to the control's list once the user clicks the Refresh button. Once the data is updated, the buttons shows as disabled until next change occurs.
  • exPivotBarAllowUndoRedo(1024), indicates if the pivot bar allows Undo/Redo operations, if the user presses the CTRL+Z/Y. The control restores the previously layout once the user presses the CTRL + Z keys combination. The control restores the next layout once the user presses the CTRL + Y keys combination. Exclude this flag, and the Undo/Redo feature is disabled.
  • exPivotBarAllowResizeColumns(2048), indicates if the user can resize the columns in the pivot bar. This flag affects the columns to be displayed din the pivot bar, not the columns to be displayed in the control's list.
  • exPivotBarHideAddNew(4096), prevents showing the add new buttons in the pivot bar. Clicking the Add New button displays a list of columns or aggregate functions that can be added in the current context.
  • exPivotBarContextSortAscending(0x10000), shows the columns alphabetically in ascending order. This flag can be combined with exPivotBarContextSortReverse and so, the columns will be alphabetically displayed in descending order.
  • exPivotBarContextSortReverse(0x100000), shows the columns in reverse order. This flag can be combined with exPivotBarContextSortAscending and so, the columns will be alphabetically displayed in descending order.
  • exPivotBarReadOnly(0x10000000), makes the pivot bar read only, so no changes are allowed
Type
Pivot.PivotBarVisibleEnum
GetPivotBarVisible

GetPivotColumns() → {string}

The GetPivotColumns() method specifies the list of columns to be displayed in the pivot-table
Returns:
Returns the list of columns to be displayed in the pivot-table

The pivotColumns in BNF notation is:

pivotColumns ::= "<Aggregate>[,<Aggregate>]"
Aggregate ::= <AggregateKey>(<Index>)[<Options>] | <AggregateKey>(<Index>)[<Options>]/<Index>[:][<Options>][;<Index>[:][<Options>]]
Index ::= []
Digit ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
Order ::= A | D
Options ::= \[<Option> | ,<Option>\]
Option ::= <CheckOption> | content=<RadioOption>
where
Index, is the index of the column
CheckOption is any Key in the FormatAppearances collection
RadioOption is any Key in the FormatContents collection
AggregateKey, is any Key in the Aggregates collection
Type
string
GetPivotColumns

GetPivotColumnsFloatBarVisible() → {exontrol.Tree.ColumnsFloatBarVisibleEnum}

The GetPivotColumnsFloatBarVisible() method specifies whether the pivot-columns window is visible or hidden (it displays the columns that can used to build the pivot-table)
Returns:
Specifies whether the pivot-columns window is visible or hidden. The exontrol.Tree.ColumnsFloatBarVisibleEnum type supports the following values:
  • exColumnsFloatBarHidden(0), the pivot-columns floatbar is hidden
  • exColumnsFloatBarVisible(1), the pivot-columns floatbar is visible. This flag can be combined with exColumnsFloatBarFloat flag, to show the pivot-columns floatbar as floated
  • exColumnsFloatBarFloat(0x100), the pivot-columns floatbar is shows as floated. This flag can be combined with exColumnsFloatBarVisible type.
Type
exontrol.Tree.ColumnsFloatBarVisibleEnum
GetPivotColumnsFloatBarVisible

GetPivotRows() → {string}

The GetPivotRows() method specifies the list of group-by columns that determines the rows in the pivot-table.
Returns:
Returns the list of group-by columns that determines the rows in the pivot-table

The pivotRows in BNF notation is:

pivotRows ::= "[,]"
Column ::= <Index>[:][<Options>]
Index ::= []
Digit ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
Order ::= A | D
Options ::= \[<Option> | ,<Option>\]
Option ::= <CheckOption> | content=<RadioOption>
where
Index, is the index of the column
CheckOption is any Key in the FormatAppearances collection
RadioOption is any Key in the FormatContents collection
Type
string
GetPivotRows

GetPivotTotals() → {string}

The GetPivotTotals() method specifies the list of totals/subtotals to be shown in the pivot-table.
Returns:
Returns the list of totals/subtotals to be shown in the pivot-table.

The pivotTotals in BNF notation is:

pivotTotals ::= "<Part> | <Part>/<Part>"
Part ::= "<Aggregate>[,<Aggregate>]"
Aggregate ::= <AggregateKey>[<Options>] | <AggregateKey>(<Index>)[<Options>]
Index ::= []
Digit ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
Options ::= \[<Option>|,<Option>\]
Option ::= <CheckOption>|content=<RadioOption>
where
Index, is the index of the column
CheckOption is any Key in the FormatAppearances collection
RadioOption is any Key in the FormatContents collection
AggregateKey, is any Key in the Aggregates collection
Type
string
GetPivotTotals

GetShowDataOnDblClick() → {boolean}

The GetShowDataOnDblClick() method specifies whether the control shows the original data that generated the result when the user double clicks the item
Returns:
Returns true, if the control shows the original data that generated the result when the user double clicks the item
Type
boolean
GetShowDataOnDblClick

SetDisplayPivotFields(value)

The SetDisplayPivotFields() method changes the maximum number of columns to be displayed on the control's list
Parameters:
Name Type Description
value number Specifies the number of maximum columns to be added during the execution of the current layout.
Example
0 {number}, the control displays no pivot-columns
  256 {number}, the control displays maximum 256 pivot-columns
  -1 {number}, there is no limit for generated pivot-columns
SetDisplayPivotFields

SetDisplayPivotRows(value)

The SetDisplayPivotRows() method changes the maximum number of rows to be displayed on the control's list
Parameters:
Name Type Description
value number Specifies the number of maximum rows to be added during the execution of the current layout.
Example
0 {number}, the control displays no generated-rows
  16384 {number}, the control displays maximum 16384 rows
  -1 {number}, there is no limit for generated rows
SetDisplayPivotRows

SetFormatPivotHeader(value)

The SetFormatPivotHeader() method shows the original data that generated the result once the user double clicks the item
Parameters:
Name Type Description
value string Specifies the format to display the columns within the pivot bar

The formatPivotHeader property supports the following keywords:

aggregate {string}, specifies the name of the aggregate-function associated with the column, or empty, for pivot-rows columns
ilevel {number}, indicates the index of the level where the aggregate-function is shown. This is valid for total-rows only, else it is -1
caption {string}, indicates the original-caption of the column
icaption {number}, specifies the index of the column
display {number}, specifies whether the caption is shown on the control's pivot bar (0), or in the columns header(1)
Example
"" {string}, no caption is displayed for any of columns within the pivot bar
  "lower(aggregate and caption ? ('<fgcolor gray>' + aggregate + '</fgcolor>(' + caption + ')') : aggregate or caption)" {string}, shows the aggregate-function in gray and the column between parenthesis 
  "(aggregate = 'sum' ? '<b>&#931;' : aggregate) + (aggregate and caption ? '(':'') + caption + (aggregate and caption ? ')':'') + (aggregate = 'sum' ? '</b>' : '')", shows sigma-character instead of Sum of
SetFormatPivotHeader

SetPivotBarVisible(value)

The SetPivotBarVisible() method shows or hides the control's pivot bar (it displays the layout of the pivot-table)
Parameters:
Name Type Description
value Pivot.PivotBarVisibleEnum A value that indicates whether the control's pivot bar is visible or hidden. The PivotBarVisibleEnum type supports the following values:
  • exPivotBarHidden(0), the pivot bar is hidden.
  • exPivotBarVisible(1), the pivot bar is visible. include or exclude this flag to show or hide the pivot bar.
  • exPivotBarSizable(2), the pivot bar is sizable. Include or exclude this flag to allow or prevent resizing the pivot bar at runtime. If this flag is present, the user can resize the pivot bar by dragging the bottom side of the control. The resize cursor is shown when the pivot bar is resizable and cursor hovers the bottom side of the pivot bar.
  • exPivotBarFloat(4), the pivot bar is shown into a floating window. Include this flag, to display the pivot bar to a separate window (a floating panel)
  • exPivotBarAutoFit(8), the pivot bar's size is updated automatically so all elements fits the client area (When this flag is present, the height of the pivot's bar is automatically adjusted so the entire content fits the header).
  • exPivotBarShowTotals(16), the pivot bar shows the total/sub-total fields. Include or exclude this flag to show or hide the Total field in the pivot bar.
  • exPivotBarAutoHide(32), shows the pivotbar as soon as the cursor hovers it, and hides it as soon as the cursor leaves it
  • exPivotBarAllowValues(64), specifies if the user can drop values of the columns to the pivot bar.
  • exPivotBarAllowFormatAppearance(128), specifies if the user can select a different appearance for columns or total/subtotal fields.
  • exPivotBarAllowFormatConditionalAppearance(0x1000000), specifies if the user can select conditional appearance for columns.
  • exPivotBarAllowFormatContent(256), specifies if the user can select the way the column's data is displayed.
  • exPivotBarAutoUpdate(512), indicates whether the control' list (pivot-table) is automatically updated once the user drops objects in the pivot bar. Exclude this flag from the pivotBarVisible property, and so the Refresh button is shown in the bottom side of the control, and the changes will be applied to the control's list once the user clicks the Refresh button. Once the data is updated, the buttons shows as disabled until next change occurs.
  • exPivotBarAllowUndoRedo(1024), indicates if the pivot bar allows Undo/Redo operations, if the user presses the CTRL+Z/Y. The control restores the previously layout once the user presses the CTRL + Z keys combination. The control restores the next layout once the user presses the CTRL + Y keys combination. Exclude this flag, and the Undo/Redo feature is disabled.
  • exPivotBarAllowResizeColumns(2048), indicates if the user can resize the columns in the pivot bar. This flag affects the columns to be displayed din the pivot bar, not the columns to be displayed in the control's list.
  • exPivotBarHideAddNew(4096), prevents showing the add new buttons in the pivot bar. Clicking the Add New button displays a list of columns or aggregate functions that can be added in the current context.
  • exPivotBarContextSortAscending(0x10000), shows the columns alphabetically in ascending order. This flag can be combined with exPivotBarContextSortReverse and so, the columns will be alphabetically displayed in descending order.
  • exPivotBarContextSortReverse(0x100000), shows the columns in reverse order. This flag can be combined with exPivotBarContextSortAscending and so, the columns will be alphabetically displayed in descending order.
  • exPivotBarReadOnly(0x10000000), makes the pivot bar read only, so no changes are allowed
Example
false {boolean} or 0 {number}, the control's pivotbar is hidden
 0x10000000 or exontrol.Pivot.PivotBarVisibleEnum.exPivotBarReadOnly {number}, shows a read-only pivot bar (no changes are allowed)
SetPivotBarVisible

SetPivotColumns(value)

The SetPivotColumns() method defines the list of columns to be displayed in the pivot-table
Parameters:
Name Type Description
value string Indicates the list of columns to be displayed in the pivot-table

The pivotColumns in BNF notation is:

pivotColumns ::= "<Aggregate>[,<Aggregate>]"
Aggregate ::= <AggregateKey>(<Index>)[<Options>] | <AggregateKey>(<Index>)[<Options>]/<Index>[:][<Options>][;<Index>[:][<Options>]]
Index ::= []
Digit ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
Order ::= A | D
Options ::= \[<Option> | ,<Option>\]
Option ::= <CheckOption> | content=<RadioOption>
where
Index, is the index of the column
CheckOption is any Key in the FormatAppearances collection
RadioOption is any Key in the FormatContents collection
AggregateKey, is any Key in the Aggregates collection
Example
"sum(5)" {string}, adds a single column that displays the sum of data column with the index 5
 "sum(5)[content=numeric]/12" {string},  adds a column for each unique value found in the data column with the index 12, and each column displays the sum of data column with the index 5 as numeric, associated with the value of the data column
 "sum(5)[content=numeric]/12;6" {string},  groups by data columns with the index 12 and 6, and adds a new column for each unique value found, by displaying the sum of data column with the index 5 as numeric, for the associated values in the data columns
 "sum(5)[bold,content=numeric],sum(5)[content=numeric]/12;6" string, adds a single column that displays the sum of data column with the index 5 in bold as numeric, and follows the group-by data columns shown earlier
SetPivotColumns

SetPivotColumnsFloatBarVisible(value)

The SetPivotColumnsFloatBarVisible() method shows or hides the pivot-columns window (it displays the columns that can used to build the pivot-table)
Parameters:
Name Type Description
value exontrol.Tree.ColumnsFloatBarVisibleEnum A value that indicates whether the pivot-columns window is visible or hidden. The exontrol.Tree.ColumnsFloatBarVisibleEnum type supports the following values:
  • exColumnsFloatBarHidden(0), the pivot-columns floatbar is hidden
  • exColumnsFloatBarVisible(1), the pivot-columns floatbar is visible. This flag can be combined with exColumnsFloatBarFloat flag, to show the pivot-columns floatbar as floated
  • exColumnsFloatBarFloat(0x100), the pivot-columns floatbar is shows as floated. This flag can be combined with exColumnsFloatBarVisible type.
Example
false {boolean} or 0 {number}, the control shows no pivot-columns floatbar
 true {boolean} or 1 {number}, the control shows the pivot-columns floatbar
 0x101 or exontrol.Tree.ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisible | exontrol.Tree.ColumnsFloatBarVisibleEnum.exColumnsFloatBarFloat {number}, the control's pivot-columns floatbar is visible and floated
SetPivotColumnsFloatBarVisible

SetPivotRows(value)

The SetPivotRows() method defines the list of group-by columns that determines the rows in the pivot-table
Parameters:
Name Type Description
value string Indicates the list of group-by columns that determines the rows in the pivot-table

The pivotRows in BNF notation is:

pivotRows ::= "[,]"
Column ::= <Index>[:][<Options>]
Index ::= []
Digit ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
Order ::= A | D
Options ::= \[<Option> | ,<Option>\]
Option ::= <CheckOption> | content=<RadioOption>
where
Index, is the index of the column
CheckOption is any Key in the FormatAppearances collection
RadioOption is any Key in the FormatContents collection
Example
"" {string}, displays the source-data
 "0,1:D[bold]" {string}, displays the pivot-table that groups by 0(ascending) and 1(descending) columns, and values of column 1 are shown in bold
SetPivotRows

SetPivotTotals(value)

The SetPivotTotals() method defines the list of totals/subtotals to be shown in the pivot-table.
Parameters:
Name Type Description
value string Indicates the list of totals/subtotals to be shown in the pivot-table.

The pivotTotals in BNF notation is:

pivotTotals ::= "<Part> | <Part>/<Part>"
Part ::= "<Aggregate>[,<Aggregate>]"
Aggregate ::= <AggregateKey>[<Options>] | <AggregateKey>(<Index>)[<Options>]
Index ::= []
Digit ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
Options ::= \[<Option>|,<Option>\]
Option ::= <CheckOption>|content=<RadioOption>
where
Index, is the index of the column
CheckOption is any Key in the FormatAppearances collection
RadioOption is any Key in the FormatContents collection
AggregateKey, is any Key in the Aggregates collection
Example
"sum" {string}, adds a total-row (adds the values within each column and shows up the result)
 "max/min" {string}, adds a min-row to show up and a max-row to show down
SetPivotTotals

SetShowDataOnDblClick(value)

The SetShowDataOnDblClick() method shows the original data that generated the result once the user double clicks the item
Parameters:
Name Type Description
value boolean Specifies whether the control shows the original data that generated the result when the user double clicks the item
Example
false {boolean}, no effect, instead the expandOnDblClick has effect (specifies whether the item is expanded or collapsed once the user double-clicks the item)
  true {boolean}, the control displays the original data that generated the result, as soon as user double-clicks the item (expandOnDblClick has no effect)
SetShowDataOnDblClick