Column class (Pivot)

Column(oColumns, oOptions)

new Column(oColumns, oOptions)

The Column object holds information(options) about a column within the control. The Column object provides methods to get or set the column's options such as caption, image and so on, either at once by using the Options property, or individually by using the associated property of the option. The Columns.Add() method creates and adds a new column into the control. Use the Column(id)method to get the column based on its index or identifier/key. The Remove method of the Column object removes the column itself from columns collection ( equivalent of Columns.Remove(oColumn) method ).

Every option of the ColumnOptions type has associated a property of the Column object. For instance, the option:

cursor {string}, defines the mouse-cursor for individual column (column's header)
is associated with the property:
Cursor {string}, defines the mouse-cursor for individual column (column's header)
which means that the following statements are equivalent:
oColumn.Options = {cursor: "pointer"}
oColumn.SetOptions({cursor: "pointer"})
oColumn.Cursor = "pointer"
oColumn.SetCursor("pointer")
where oColumn is an object of Column type
Parameters:
Name Type Description
oColumns Columns Indicates an object of Columns type that's the owner collection of this column.
oOptions ColumnOptions Specifies an object of ColumnOptions type that holds information about the column, such as caption, image and so on. If the oOptions parameter is not-of object type it indicates the column's caption instead.

Members

AllowDrag :boolean

The AllowDrag property specifies whether the column is dragable. The GetAllowDrag() and SetAllowDrag() methods provide access to this property. The default value of this property is true. If the AllowDrag property is set to false, the user cannot drag the column. The user can drag a column to reorder it within the control or to drop it into the control's sortbar in order to group by the column.
Type:
  • boolean
Example
false {boolean}, the user can not drag the column
true {boolean}, the column is dragable
AllowDrag

AllowEdit :boolean

The AllowEdit property whether the column is editable or readonly. The AllowEdit property works in conjunction with the Pivot's "edit" options of AllowActions property. If the AllowActions property does not include "edit" action, the cells within the column cannot be edited even if the AllowEdit property is set to true. The Values property specifies a list of predefined values that the user can choose from. The default value is false.
Type:
  • boolean
Example
false {boolean}, specifies a readonly column
true {boolean}, the cells within the column are editable (if "edit" action is allowed)
AllowEdit

AllowGroupBy :boolean

The AllowGroupBy property specifies whether the column can be grouped by. The Columns.Sorts property holds the list of columns that are currently grouped by. The GetAllowGroupBy() and SetAllowGroupBy() methods provide access to this property. The default value of this property is true. If the AllowGroupBy property is set to false, the user cannot group by this column. If the AllowGroupBy property is set to true, the column gets grouped-by once the column's header is dropped into the control's sortbar. The AllowDrag property must also be set to true in order to group by the column.
Type:
  • boolean
Example
false {boolean}, the user can not group by this column
true {boolean}, the column gets grouped-by once the column's header is dropped into the control's sortbar
AllowGroupBy

AllowSizing :boolean

The AllowSizing property specifies whether the column is resizable or fixed. The default value is true. The Width property specifies the column's width. The onchange("resize-column") event notifies that a column has been resized via UI interaction. Resizing the column via drag and drop is possible when the "column-resize" action is enabled in the AllowActions property. The AllowSizing property is equivalent with GetAllowSizing() and SetAllowSizing() methods.
Type:
  • boolean
Example
false {boolean}, the user can not resize the column
true {boolean}, the column is resizable
AllowSizing

AllowSort :boolean

The AllowSort property specifies whether the column is sortable. The GetAllowSort() and SetAllowSort() methods provide access to this property. If the AllowSort property is set to false, the user cannot sort the column. The Sorts property of the Columns object holds the list of columns that are currently sorted. The SingleSort property specifies whether the control supports single or multiple-columns sort. The default value of this property is true.
Type:
  • boolean
Example
false {boolean}, the user can not sort the column
true {boolean}, the column is sortable
AllowSort

Caption :string

The Caption property gets or sets the column's caption (ex-HTML format). The column's caption is displayed within the column's header. The ToolTip property defines the column's predefined tooltip. The Caption property is equivalent with GetCaption() and SetCaption() methods. By using the Caption property, the following statements are equivalents:
 oColumn.Caption = "caption", changes the column's caption
 oColumn.SetCaption("caption"), changes the column's caption
 sCaption = oColumn.Caption, gets the column's caption
 sCaption = oColumn.GetCaption(), gets the column's caption
where oColumn is an object of Column type.
Type:
  • string
Example
null {null}, indicates no caption
"caption" {string}, declares a plain-caption
"<b>text</b>" {string}, displays the text in bold
"<img>logo</img>" {string}, displays the "logo" image. The image can be added using the exontrol.HTMLPicture.Add method
Caption

CellCursor :any

The CellCursor property gets or sets the mouse cursor for the column's body/data/cells. The CellCursor property is equivalent with GetCellCursor() and SetCellCursor() methods. The Cursors/GetCursors()/SetCursors(value) {string}, defines the mouse cursor to display when pointing over different parts of the control.
Type:
  • any
Example
"pointer" {string}, The cursor is a pointer that indicates a link (typically an image of a pointing hand)
CellCursor

CellHasCheck :number

The CellHasCheck property indicates whether the check-box or radio-button for all cells within the column are visible or hidden. The check-boxes or radio-buttons within the column's cells are shown or hidden based on the value of the CellHasCheck property. If the Cell.HasCheck property is null, the visibility of the cell's check box or radio button is determined by the Column.CellHasCheck property. The PartialCheck property must be set to true in order to enable the partial-check feature. Once the PartialCheck property is set to true, checking/unchecking a parent item's check-box will check/uncheck all its descendents. The CellHasCheck property can be set to any of the following values:
  • 0 {number}, the column shows no check-box or radio-button
  • 1 {number}, the column displays a check-box for each cell.
  • 2 {number}, the column displays a radio-button for each cell (only a cell within the entire-column can be checked).

The default value is 0.

Type:
  • number
Example
0 {number}, the cell's hasCheck field specifies whether a check-box or radio-button is shown within the cell
1 {number}, the column shows a check-box for each cell (while cell's hasCheck field is not 0)
2 {number}, the column shows a radio-button for each cell (while cell's hasCheck field is not 0). If column's cellHasCheck field is 0, you can have multiple group of radio-cells, by using the cell's hasCheck property on 2 (sibling cells are considered a group of radio-cells)
CellHasCheck

CellShape :any

The CellShape property gets or sets the shape to apply on the column's body/data/cells. The CellShape property is equivalent with GetCellShape() and SetCellShape() methods. The Cell.Shape property changes the shape for the cell itself. The Column.Shape property changes the shape for the column itself (column's header). The value could be any of the following:
  • {null}, no custom-shape is applied
  • the shape's name within the exontrol.Shapes.Pivot or exontrol.Shapes namespace
  • a CSS color
  • a JSON string-representation of an object of exontrol.Def.Shape type, for the column itself
  • an object of {normal,hover,click,disabled} type. The normal, hover, click and disabled are objects of exontrol.Def.Shape type
The Shapes/GetShapes()/SetShapes(value) {string}, defines the shapes each part of the control can display. The shapes field customizes the control's visual appearance.
Type:
  • any
Example
null {null}, no custom shape is applied (default object's shape may be applied)
"" {string}, no custom shape is applied (no default object's shape is be applied)
"red" {string}, fills the object's background in red (CSS color)
'{"fillColor": "red"}' or '{"normal":{"fillColor": "red"}}' {string}, fills the object's background in red (JSON-representation of an object of exontrol.Def.Shape type)
CellShape

Cursor :any

The Cursor property gets or sets the mouse cursor for the column itself (column's header). The Cursor property is equivalent with GetCursor() and SetCursor() methods. The Cursors/GetCursors()/SetCursors(value) {string}, defines the mouse cursor to display when pointing over different parts of the control.
Type:
  • any
Example
"pointer" {string}, the cursor is a pointer that indicates a link (typically an image of a pointing hand)
Cursor

DefaultSortOrder :number

The DefaultSortOrder property gets or sets the column's default sort-order. The DefaultSortOrder property is equivalent with GetDefaultSortOrder() and SetDefaultSortOrder() methods. The value could be any of the following:
  • 1 {number}, sorts ascending the column
  • 2 {number}, sorts descending the column
By default, the column's default sort-order is ascending(1).
Type:
  • number
Example
1 {number}, sorts ascending the column
2 {number}, sorts descending the column
DefaultSortOrder

DisplayExpandButton :boolean

The DisplayExpandButton property specifies whether the column displays its expand/collapse glyphs. The ExpandColumns property specifies the list of columns to be shown when the current column is expanded. The Expanded property specifies whether the column is expanded or collapsed. The default value is true.
Type:
  • boolean
Example
false {boolean}, the column hides its expand/collapse glyphs
true {boolean}, the column shows its expand/collapse glyphs.
DisplayExpandButton

DisplayFilterButton :boolean

The DisplayFilterButton properyy specifies whether the column shows the filter-button. The onfilter event notifies your application once the control's filter has been changed. The onfilter event is triggered when the user applies a new filter or clears the existing filter. The default value is true. The filter-button allows the user to filter the items based on the values within the column. Clicking the filter-button displays a drop-down menu that allows the user to select the values to be displayed within the column.
Type:
  • boolean
Example
false {boolean}, the column's filter button is hidden
true {boolean}, the column's filter button is shown
DisplayFilterButton

EditOptions :EditOptions

The EditOptions property specifies the options to apply on the input element while editing the cell of the current column. These options are merged with the options defined by exontrol.Pivot.EditOptions object. The default value is null, which means that the exontrol.Pivot.EditOptions object defines the default options to apply on the input element while editing the cell of the current column. The Edit() method (of the Cell object) edits programmatically the current cell, using the options defined by the EditOptions property of the corresponding column.
Type:
Since:
  • 2.4
Example
null {null}, The exontrol.Pivot.EditOptions object defines the default options to apply on the input element while editing the cell of the current column.
{inner: {type: "date"}} {EditOptions}, create an input field that let the user enter a date, either with a textbox that validates the input or a special date picker interface (equivalent of <input type="date">)
{inner: {style: {background: "white"}}} {EditOptions}, sets the editor's background to white
{validate: function(value) { return value < 10; }} {EditOptions}, ensures that the value the user entered is always less than 10
{change: true, selectAll: true} {EditOptions}, the cell's value is updated as soon as user changes the input field and all text gets selected once the cell enters in edit-mode
EditOptions

Enabled :boolean

The Enabled property enables or disables the column. The Enabled property is equivalent with GetEnabled() and SetEnabled() methods. When a column is disabled, the user cannot interact with it (for instance, cannot sort or filter by that column). Also, a disabled column shows its caption and cells with a disabled-appearance (grayed out).
Type:
  • boolean
Example
false {boolean}, disables the column
true {boolean}, enables the column
Enabled

ExpandColumns :any

The ExpandColumns property specifies the list of columns to be shown when the current column is expanded, separated by comma character. The ExpandColumns property is equivalent with GetExpandColumns() and SetExpandColumns() methods. The value could be any of the following:
  • {number} Indicates a numeric value that defines the index of the column to request
  • {string} Specifies a list of index/identifier/key/caption/plain-caption, separated by comma character
  • {Column} specifies the object reference to be shown, once the current column is expanded
By default, the column includes no expandable-columns. The Expanded property specifies whether the column is expanded or collapsed.
Type:
  • any
Example
1 {number}, specifies that the column with the index 1, is shown once the current column is expanded.
"C1,C2" {string}, indicates that the columns C1 and C2 are being shown once the current column is expanded.
ExpandColumns

Expanded :boolean

The Expanded property expands or collapses the column. The onchange("expand-column") event notifies that a column has been expanded or collapsed through UI interaction. When the column is expanded, the columns specified in the ExpandColumns property are shown. When the column is collapsed, the columns specified in the ExpandColumns property are hidden. The Expanded property is equivalent with GetExpanded() and SetExpanded() methods. By default, the column is expanded.
Type:
  • boolean
Example
false {boolean}, the column is collapsed
true {boolean}, the column is expanded
Expanded

Filter :string

The Filter property filters for items based on values within this column. The onfilter event notifies your application once the control's filter has been changed. The onfilter event is triggered when the user applies a new filter or clears the existing filter. The filter depends on the filterType as explained:
  • filterType = exFilter, the filter field indicates the list (separated by "|" character) of values to filter for. For instance, filter = "Cell A", filters for items with the caption "Cell A", filter = "Cell A|Cell B", filters for items with the caption "CellA" or "CellB".
  • filterType = exPattern, the filter field defines the wild-patterns to filter for items (separated by "|" character). A pattern-filter may contain wild card characters like '?' for any single character, '*' for zero or more occurrences of any character, '#' for any digit character. For instance: "A*" filters for items that begins with "A" or "a", "A*|B*" filters for items that starts with "A", "a", "B" or "b".
  • filterType = exDate, the filter field contains alternative interval-dates to filter for (separated by "|" character). An interval-date could be of "[dateFrom] [to] [dateTo]" or "[operator] date [operator date ...]" format. The "[dateFrom] [to] [dateTo]" format filter for items that fit the interval. For instance: "2/13/2004" filter only for items with the date on 2/13/2004, "2/13/2004 to", filter for items whose date is greater or equal with 2/13/2004, "to 2/13/2004" filter for items with the date less or equal with 2/13/2004. For instance: "2/13/2004 | 2/13/2005 to" filter for items with the date on 2/13/2004 or greater or equal with 2/13/2005. The "operator date [operator date ...]" format allows to filter using multiple operators as <, <=, =, <>, !=, >= or >. For instance: "> 2/13/2004" filter for items with the date greater than 2/13/2004, "> 2/13/2004 | <= 2/13/2002" filter for dates greater than 2/13/2004 or less or greater than 2/13/2002
  • filterType = exNumeric, the filter field specifies a list of numeric-rules to filter for (separated by "|" character). The format of filter field is "[operator] number [operator number ...]", which define numeric-rule, where operator is one of <, <=, =, <>, !=, >= or >. For instance, the "> 10" filters for numbers greater than 10, "> 10 < 100" filters for numbers greater than 10 and less than 100, "10|20|>50" filters for items that include 10, 20 or any number greater than 50
  • filterType = exCheck, the filter field specifies a list of states to filter for (separated by "|" character). The cell's state is "0" (unchecked), "1" (checked) and "2" (partial-checked). For instance: "1" filters for checked items, "1|2" filters for partially and checked items
  • filterType = exImage, the filter field defines the list of images (separated by "|" character) to filter for. The Cell.Image property specifies the image of the cell. For instance, "Al" filters for items that displays the "Al" picture/image, "Al|Peggy" filters for items that displays the "Al" or "Peggy" images. The exontrol.HTMLPicture.Add method adds named images to the control.
The filter field has no effect if the filterType field is exAll, exBlanks or exNonBlanks. The filter is case-sensitive, if the filterType includes the exFilterDoCaseSensitive flag.
Type:
  • string
Example
"Cell A" {string}, filters for items with the caption "Cell A" (if filterType = exFilter)
"Cell A|Cell B" {string}, filters for items with the caption "CellA" or "CellB" (if filterType = exFilter)
"A*" {string}, filters for items that begins with "A" or "a" (if filterType = exPattern)
Filter

FilterList :Pivot.FilterListEnum

The FilterList property specifies whether the column's drop down filter list includes visible or all items. The Filter property filters for items based on values within this column. The FilterType property specifies the type of filter being applied to the column. The Pivot.FilterListEnum type supports the following values and flags:
  • exAllItems (0), the filter's list includes all values in the column.
  • exVisibleItems (1), the filter's list includes only visible (filtered) items from the column. The visible items include child items of collapsed items.
  • exNoItems (2), the filter's list includes no item from the column.
  • exLeafItems (3), the filter's list includes the leaf items only. A leaf item is an item with no child items.
  • exRootItems (4), the filter's list includes the root items only. A root item has no parent item.
  • exSortItemsDesc (0x10), sorts descending the items of the filter's list. If none of the exSortItemsAsc or exSortItemsDesc is present, the list is built as the items are displayed in the control.
  • exSortItemsAsc (0x20), sorts ascending the items of the filter's list. If none of the exSortItemsAsc or exSortItemsDesc is present, the list is built as the items are displayed in the control.
  • exShowCheckBox (0x100), Displays a check-box for each item within the filter's list.
  • exShowExclude (0x2000), Shows or hides the Exclude-checkbox. The exFilterExclude flag excludes programmatically the selected items in the drop down filter panel.
  • exShowBlanks (0x4000), The filter's list includes (Blanks) and (NonBlanks) items
Type:
Example
2 or exontrol.Pivot.FilterTypeEnum.exNonBlanks {number}, filters for not-blank items (a blank item is an empty item or an item that displays whitespace characters)
6 or exontrol.Pivot.FilterTypeEnum.exCheck {number}, filters for checked-items (while filter field is "1") or unchecked-items (while filter field is "0")
FilterList

FilterOnType :boolean

The FilterOnType property allows you to filter the column's data based on the typed characters. The Filter property filters for items based on values within this column. The FilterType property specifies the type of filter being applied to the column. The ChangeFilter() method changes the column's filter and filterType at once (validates the view and applies the filter once).
Type:
  • boolean
Example
false {boolean}, no filter-on-type input is available for the column (excepts columns of exPattern, exDate or exNumeric type)
true {boolean}, the column's filter-on-type input is displayed as soon as the user clicks the column's funnel glyph (no column's filter-list is displayed, if available)
FilterOnType

FilterType :Pivot.FilterTypeEnum

The FilterType property changes the type of the column's filter. The Filter property filters for items based on values within this column. The Pivot.FilterTypeEnum type supports the following values and flags:
  • exAll (0), no filter is applied
  • exBlanks (1), includes only blank/empty items (a blank item is an empty item or an item that displays whitespace characters)
  • exNonBlanks (2), includes only non blank/empty items (a blank item is an empty item or an item that displays whitespace characters)
  • exPattern (3), includes only items that match the pattern. The Filter property defines the pattern. A pattern may contain the wild card characters '?' for any single character, '*' for zero or more occurrences of any character, '#' for any digit character, and [chars] indicates a group of characters. If any of the *, ?, # or | characters are preceded by a \ ( escape character ) it masks the character itself. Can be combined with exFilterDoCaseSensitive flag
  • exDate (4), includes only items that fit the date interval. The Filter property of the Column object defines the interval of dates being used to filter items. The interval of dates should be as [dateFrom] to [dateTo]. If the dateFrom value is missing, the control includes only the items before the dateTo date, if the dateTo value is missing, the control includes the items after the dateFrom date. If both dates ( dateFrom and dateTo ) are present, the control includes the items between this interval of dates. For instance, the "2/13/2004 to" includes all items after 2/13/2004 inclusive, or "2/13/2004 to Feb 14 2005" includes all items between 2/13/2004 and 2/14/2004.
  • exNumeric (5), includes only items of numeric type that check the expression. The expression supports operators like <, <=, =, <>, >= or > and numbers to define rules. For instance, the "> 10 < 100" filter indicates all numbers greater than 10 and less than 100.
  • exCheck (6), includes only checked-items, while Filter property is "1" or unchecked-items if Filter is "0"
  • exImage (10), includes only items that match the images within the Filter property.
  • exFilter (240), includes only items that match the Filter property. Can be combined with exFilterDoCaseSensitive flag
  • exFilterDoCaseSensitive (0x100), By default, the column's filter is case-insensitive. Specifies a case-sensitive column's filter. Can be combined with exPattern or exFilter flag
  • exFilterExclude (0x200), The flag indicates that the Exclude-checkbox of the column is checked. The flag indicates that the items that match the filter are excluded from the list.
The filter depends on the filterType as explained:
  • filterType = exFilter, the filter field indicates the list (separated by "|" character) of values to filter for. For instance, filter = "Cell A", filters for items with the caption "Cell A", filter = "Cell A|Cell B", filters for items with the caption "CellA" or "CellB".
  • filterType = exPattern, the filter field defines the wild-patterns to filter for items (separated by "|" character). A pattern-filter may contain wild card characters like '?' for any single character, '*' for zero or more occurrences of any character, '#' for any digit character. For instance: "A*" filters for items that begins with "A" or "a", "A*|B*" filters for items that starts with "A", "a", "B" or "b".
  • filterType = exDate, the filter field contains alternative interval-dates to filter for (separated by "|" character). An interval-date could be of "[dateFrom] [to] [dateTo]" or "[operator] date [operator date ...]" format. The "[dateFrom] [to] [dateTo]" format filter for items that fit the interval. For instance: "2/13/2004" filter only for items with the date on 2/13/2004, "2/13/2004 to", filter for items whose date is greater or equal with 2/13/2004, "to 2/13/2004" filter for items with the date less or equal with 2/13/2004. For instance: "2/13/2004 | 2/13/2005 to" filter for items with the date on 2/13/2004 or greater or equal with 2/13/2005. The "operator date [operator date ...]" format allows to filter using multiple operators as <, <=, =, <>, !=, >= or >. For instance: "> 2/13/2004" filter for items with the date greater than 2/13/2004, "> 2/13/2004 | <= 2/13/2002" filter for dates greater than 2/13/2004 or less or greater than 2/13/2002
  • filterType = exNumeric, the filter field specifies a list of numeric-rules to filter for (separated by "|" character). The format of filter field is "[operator] number [operator number ...]", which define numeric-rule, where operator is one of <, <=, =, <>, !=, >= or >. For instance, the "> 10" filters for numbers greater than 10, "> 10 < 100" filters for numbers greater than 10 and less than 100, "10|20|>50" filters for items that include 10, 20 or any number greater than 50
  • filterType = exCheck, the filter field specifies a list of states to filter for (separated by "|" character). The cell's state is "0" (unchecked), "1" (checked) and "2" (partial-checked). For instance: "1" filters for checked items, "1|2" filters for partially and checked items
  • filterType = exImage, the filter field defines the list of images (separated by "|" character) to filter for. The Cell.Image property specifies the image of the cell. For instance, "Al" filters for items that displays the "Al" picture/image, "Al|Peggy" filters for items that displays the "Al" or "Peggy" images. The exontrol.HTMLPicture.Add method adds named images to the control.
The filter field has no effect if the filterType field is exAll, exBlanks or exNonBlanks. The filter is case-sensitive, if the filterType includes the exFilterDoCaseSensitive flag.
Type:
Example
2 or exontrol.Pivot.FilterTypeEnum.exNonBlanks {number}, filters for not-blank items (a blank item is an empty item or an item that displays whitespace characters)
6 or exontrol.Pivot.FilterTypeEnum.exCheck {number}, filters for checked-items (while filter field is "1") or unchecked-items (while filter field is "0")
FilterType

Format :string

The Format property specifies the format to display the cells in the column. The Format property supports a format-expression that can include various keywords and operators to customize how cell values are displayed. The FormatImage property defines the expression to determine the images the column display. The format-expression supports the following keywords:
value, indicates the value of the current cell ( "value/2 format ``", displays half of the value using current regional format )
%0, %1, %2, ... {any} specifies the value of the cell in the column with the index 0, 1 2, ... ( "currency(%0 + %1)", adds the value of first and second cell and displays it as a currency )
%C0, %C1, %C2, ... {string} specifies the caption of the cell, or the string the cell displays in the column with the index 0, 1 2, ... ( "%C0 + %C1", concatenates the caption of first and second cell )
%CD0, %CD1, %CD2, ... {any} specifies the cell's user-date in the column with the index 0, 1 2, ... ( "%CD0 ? value : ``", displays the cell's value only if the cell's data is not empty )
%CS0, %CS1, %CS2, ... {number} specifies the cell's state in the column with the index 0, 1 2, ... ( "(%CS0 ? `<b>` : ``) + value", displays the cell's value in bold only if the first cell is checked )
%CT0, %CT1, %CT2, ... {boolean} returns true if the cell displays a total field; otherwise, it returns false. The exTotalField / exTotalColumn flag specifies whether the cell displays a total field. For instance, "%CT1" refers to all cells in the second column that display totals, while "not %CT1" refers to all cells in the second column that do not display totals (@since 3.3)
%CE0, %CE1, %CE2, ... {boolean} returns true if the cell is editable; otherwise, it returns false.. For example, "%CE0" refers to all editable cells in the first column, while "not %CE1" refers to all cells in the second column that are read-only (@since 3.3)
%CC0, %CC1, %CC2, ... {number} retrieve the number of child items (this keyword consistently returns identical results for all cells since it pertains to the item that hosts each cell). The ChildCount property returns the number of child items. For example, "%CC0" identifies all parent items, while "%CC0 = 0" identifies all leaf items (@since 3.3)
%CX0, %CX1, %CX2, ... {boolean} returns true if the item hosting the cell is expanded, or false if it is collapsed (this keyword consistently returns identical results for all cells since it pertains to the item that hosts each cell). The Item.Expanded property specifically indicates whether the item is expanded or collapsed. For example, "%CX0" refers to all expanded items, while "not %CX0" identifies all collapsed items (@since 3.3)
The format-expression supports the following unary-operators:
  • exp(``), checks whether the item is expanded or collapsed ( "(exp(``) ? `<b>` : ``) + value", shows expanded-items in bold )
  • get(`aggregate(list,direction,formula)`), summarizes the cell based on "aggregate(list,direction,formula)" syntax, where:
    aggregate, must be one of the following:
    • sum, performs addition of values
    • min, retrieves the minimum value
    • max, retrieves the maximum value
    • count, counts the number of items
    • avg, calculates the average of values
    • std, gets standard-deviation of numbers
    • unique, counts how many distinct values are in the set (@since 4.3)
    list, must be one of the following:
    • a number expression that specifies the index of the item being referred
    • all, indicates all items, so the formula is being applied to all items
    • current, refers the current item
    • parent, refers to the parent item
    • root, refers to the root item (the root item has no parent items)
    direction, must be one of the following:
    • dir, collects only direct descendents (child-items)
    • rec, collects recursivelly the leaf descendents ( leaf items ). A leaf item is an item with no child items
    • all, collects all descendents
    Currently, the following items are excluded by aggregate functions:
    not-sortable items. The Item.Sortable property specifies whether the item can be sorted ( a sortable item can change its position after sorting, while a not-sortable item keeps its position after sorting. not-selectable items. The Item.Selectable property specifies whether the user can selects/focus the specified item. divider items. The Item.Divider property specifies whether the item displays a single cell, instead displaying whole cells.
    In conclusion, aggregate functions counts ONLY items that are sortable, selectable and not a divider-item.

    For instance:
    "get(`count(current,dir,1)`)", gets the count of child-items
    "get(`count(current,all,1)`)", gets the count of all child-items (implies recursively child items)
    "get(`count(current,rec,1)`)", counts the number of leaf items ( a leaf item is an item with no child items )
    "get(`sum(current,dir,%1 ? 1 : 0)`)", counts the number of child-items that have not-empty cells within the second-column
    "get(`sum(current,dir,value)`)", gets the total of values of child-items (direct descendent) within the same column
    "get(`sum(all,rec,value)`)", gets the total of values of leaf-items within the same column
    "get(`sum(parent,dir,dbl(%1) + dbl(%2))`)", gets the addition of all cells in the second (%1) and third (%2) column that are directly descendent of the parent item (sibling)
The format-expression supports the following binary-operators:
0 index `format`, gets the index of the item (0-based). The first added item has the index 0, the second added item has the index 1, and so on. The index of the item remains the same even if the order of the items is changed by sorting or grouping ( "1 index ``", gets the index of the item starting from 1 )
0 rindex `delimiter|format|format|...`, returns the recursive-index of the item ("1 rindex `.|A-Z`", returns values as A, A.1, A.2, B, ...)
0 pos `format`, returns the relative position of the item (the position within the parent's children collection) ( "1 pos ``", returns the position of the item (1-based) within the parent's child items collection )
0 rpos `delimiter|format|format|...`, returns the recursive relative-position of the item (the position within the parent's children collection) ( "1 rpos `.|A-Z`", returns values as A, A.1, A.2, B, ... )
0 opos `format`, returns the relative old position of the item (the position within the parent's children collection) ( "1 opos ``", returns the position of the item (1-based) within the parent's child items collection )
0 ropos `delimiter|format|format|...`, returns the recursive relative-old-position of the item (the position within the parent's children collection) ( "1 ropos `.|A-Z`", returns values as A, A.1, A.2, B, ... )
0 apos `format`, returns the absolute position of the item (the position from the first visible item) ( "1 apos ``", gets absolute position of the item )
0 rapos `delimiter|format|format|...`, returns the recursive absolute-position of the item (the position from the first visible item) ( "1 rapos `.|A-Z`", returns values as A, A.1, A.2, B, ... )
where:
  • `delimiter`, is a character to separated recursive-operators such as "rindex", "rpos", "ropos" and "rapos"
  • `format`, is a set of characters to be used for specifying the index
Additionally, it supports parent and root unary operators to access the values of parent or root items as explained:
parent (unary operator), refers to the parent item of the current item. This expression allows access to values or properties associated with the immediate parent in the hierarchy or structure ( "parent(1 index ``)", gets the index of the parent-item (1-based) ) (@since 4.3)
root (unary operator), refers to the root item of the current item's hierarchy. This expression allows access to values or properties of the highest-level item in the entire structure, regardless of how deeply nested the current item is ("root(%C0)", retrieves the caption of the first column for the root item) (@since 4.3)
Type:
  • string
Example
"value format ``" {string}, shows the column's value formatted as a number (as in regional settings)
"1 index ``" {string}, gets the index (1-based) of the item
"1 rpos `.|A-Z`" {string}, displays A, B, C for root-items, and A.1, A.2, A.1.1, ... B.1, B.2, ... for child-items
"currency(dbl(%0) + dbl(%1))" {string}, adds columns 0 and 1 and displays the result as currency
Format

FormatImage :string

The FormatImage property defines the expression to determine the images the column display. The exontrol.HTMLPicture.Add method adds new images to the control. The ImageAlign property gets or sets the alignment of the cell's image. The ImageSize property gets or sets the size of the cell's image. The expression may be a combination of variables, constants, strings, dates and operators, and value keyword. The value operator gives the value of the cell to display the image. The expression supports cell's identifiers as %0, %1, %2, ... which indicates the value of the cell in the column with the index 0, 1 2.
Type:
  • string
Since:
  • 1.6
Example
"" {string} or null {null}, indicates no image is shown within the column
"'logo'" {string}, the "logo" picture is displayed for the entire column
"value" {string}, the picture named by the giving value is being shown
"value case (default: 'unknown'; 'Austria': 'Austria')" {string}, shows 'Austria' image for cells with the value 'Austria', else displays 'unknown' picture
FormatImage

FormatText :exontrol.DrawTextFormatEnum

The FormatText property specifies the format to display the column's caption. The Caption property gets or sets the column's caption (ex-HTML format). The FormatText property is equivalent with GetFormatText() and SetFormatText() methods. The exontrol.DrawTextFormatEnum type supports the following flags:
  • exTextAlignTop (0x00), justifies the text to the top of the rectangle
  • exTextAlignLeft (0x00), aligns text to the left
  • exTextAlignCenter (0x01), centers text horizontally in the rectangle
  • exTextAlignRight (0x02), aligns text to the right
  • exTextAlignVCenter (0x04), centers text vertically
  • exTextAlignBottom (0x08), justifies the text to the bottom of the rectangle.
  • exTextAlignMask (0x0F), specifies the mask for text's alignment.
  • exTextWordBreak (0x10), breaks words. Lines are automatically broken between words if a word would extend past the edge of the rectangle specified by the lpRect parameter. A carriage return-line feed sequence also breaks the line. If this is not specified, output is on one line.
  • exTextSingleLine (0x20), displays text on a single line only. Carriage returns and line feeds do not break the line.
  • exTextExpandTabs (0x40), expands tab characters. The default number of characters per tab is eight.
  • exPlainText (0x80), treats the text as plain text.
  • exTextNoClip (0x0100), draws without clipping.
  • exHTMLTextNoColors (0x0200), ignores the and tags.
  • exTextCalcRect (0x0400), determines the width and height of the text.
  • exHTMLTextNoTags (0x0800), ignores all HTML tags.
  • exTextPathEllipsis (0x4000), for displayed text, replaces characters in the middle of the string with ellipses so that the result fits in the specified rectangle. If the string contains backslash (\) characters, exTextPathEllipsis preserves as much as possible of the text after the last backslash.
  • exTextEndEllipsis (0x8000), for displayed text, if the end of a string does not fit in the rectangle, it is truncated and ellipses are added. If a word that is not at the end of the string goes beyond the limits of the rectangle, it is truncated without ellipses.
  • exTextWordEllipsis (0x040000), truncates any word that does not fit in the rectangle and adds ellipses.
Type:
  • exontrol.DrawTextFormatEnum
Example
null {null}, centers the caption
32 or exontrol.DrawTextFormatEnum.exTextSingleLine {number}, defines a single-line caption
0x2A or exontrol.DrawTextFormatEnum.exTextSingleLine | exontrol.DrawTextFormatEnum.exTextAlignRight | exontrol.DrawTextFormatEnum.exTextAlignBottom {number}, defines a single-line caption right/bottom-aligned
"right" {string}, defines a caption right-aligned
FormatText

GroupByFormatCell :string

The GroupByFormatCell property the format of the cell to be displayed when the column gets grouped by. The format-expression supports the following keywords:
value, indicates the value of the current cell ( "value/2 format ``", displays half of the value using current regional format )
%0, %1, %2, ... {any} specifies the value of the cell in the column with the index 0, 1 2, ... ( "currency(%0 + %1)", adds the value of first and second cell and displays it as a currency )
%C0, %C1, %C2, ... {string} specifies the caption of the cell, or the string the cell displays in the column with the index 0, 1 2, ... ( "%C0 + %C1", concatenates the caption of first and second cell )
%CD0, %CD1, %CD2, ... {any} specifies the cell's user-date in the column with the index 0, 1 2, ... ( "%CD0 ? value : ``", displays the cell's value only if the cell's data is not empty )
%CS0, %CS1, %CS2, ... {number} specifies the cell's state in the column with the index 0, 1 2, ... ( "(%CS0 ? `<b>` : ``) + value", displays the cell's value in bold only if the first cell is checked )
%CT0, %CT1, %CT2, ... {boolean} returns true if the cell displays a total field; otherwise, it returns false. The exTotalField / exTotalColumn flag specifies whether the cell displays a total field. For instance, "%CT1" refers to all cells in the second column that display totals, while "not %CT1" refers to all cells in the second column that do not display totals (@since 3.3)
%CE0, %CE1, %CE2, ... {boolean} returns true if the cell is editable; otherwise, it returns false.. For example, "%CE0" refers to all editable cells in the first column, while "not %CE1" refers to all cells in the second column that are read-only (@since 3.3)
%CC0, %CC1, %CC2, ... {number} retrieve the number of child items (this keyword consistently returns identical results for all cells since it pertains to the item that hosts each cell). The ChildCount property returns the number of child items. For example, "%CC0" identifies all parent items, while "%CC0 = 0" identifies all leaf items (@since 3.3)
%CX0, %CX1, %CX2, ... {boolean} returns true if the item hosting the cell is expanded, or false if it is collapsed (this keyword consistently returns identical results for all cells since it pertains to the item that hosts each cell). The Item.Expanded property specifically indicates whether the item is expanded or collapsed. For example, "%CX0" refers to all expanded items, while "not %CX0" identifies all collapsed items (@since 3.3)
The format-expression supports the following unary-operators:
  • exp(``), checks whether the item is expanded or collapsed ( "(exp(``) ? `<b>` : ``) + value", shows expanded-items in bold )
  • get(`aggregate(list,direction,formula)`), summarizes the cell based on "aggregate(list,direction,formula)" syntax, where:
    aggregate, must be one of the following:
    • sum, performs addition of values
    • min, retrieves the minimum value
    • max, retrieves the maximum value
    • count, counts the number of items
    • avg, calculates the average of values
    • std, gets standard-deviation of numbers
    • unique, counts how many distinct values are in the set (@since 4.3)
    list, must be one of the following:
    • a number expression that specifies the index of the item being referred
    • all, indicates all items, so the formula is being applied to all items
    • current, refers the current item
    • parent, refers to the parent item
    • root, refers to the root item (the root item has no parent items)
    direction, must be one of the following:
    • dir, collects only direct descendents (child-items)
    • rec, collects recursivelly the leaf descendents ( leaf items ). A leaf item is an item with no child items
    • all, collects all descendents
    Currently, the following items are excluded by aggregate functions:
    not-sortable items. The Item.Sortable property specifies whether the item can be sorted ( a sortable item can change its position after sorting, while a not-sortable item keeps its position after sorting. not-selectable items. The Item.Selectable property specifies whether the user can selects/focus the specified item. divider items. The Item.Divider property specifies whether the item displays a single cell, instead displaying whole cells.
    In conclusion, aggregate functions counts ONLY items that are sortable, selectable and not a divider-item.

    For instance:
    "get(`count(current,dir,1)`)", gets the count of child-items
    "get(`count(current,all,1)`)", gets the count of all child-items (implies recursively child items)
    "get(`count(current,rec,1)`)", counts the number of leaf items ( a leaf item is an item with no child items )
    "get(`sum(current,dir,%1 ? 1 : 0)`)", counts the number of child-items that have not-empty cells within the second-column
    "get(`sum(current,dir,value)`)", gets the total of values of child-items (direct descendent) within the same column
    "get(`sum(all,rec,value)`)", gets the total of values of leaf-items within the same column
    "get(`sum(parent,dir,dbl(%1) + dbl(%2))`)", gets the addition of all cells in the second (%1) and third (%2) column that are directly descendent of the parent item (sibling)
The format-expression supports the following binary-operators:
0 index `format`, gets the index of the item (0-based). The first added item has the index 0, the second added item has the index 1, and so on. The index of the item remains the same even if the order of the items is changed by sorting or grouping ( "1 index ``", gets the index of the item starting from 1 )
0 rindex `delimiter|format|format|...`, returns the recursive-index of the item ("1 rindex `.|A-Z`", returns values as A, A.1, A.2, B, ...)
0 pos `format`, returns the relative position of the item (the position within the parent's children collection) ( "1 pos ``", returns the position of the item (1-based) within the parent's child items collection )
0 rpos `delimiter|format|format|...`, returns the recursive relative-position of the item (the position within the parent's children collection) ( "1 rpos `.|A-Z`", returns values as A, A.1, A.2, B, ... )
0 opos `format`, returns the relative old position of the item (the position within the parent's children collection) ( "1 opos ``", returns the position of the item (1-based) within the parent's child items collection )
0 ropos `delimiter|format|format|...`, returns the recursive relative-old-position of the item (the position within the parent's children collection) ( "1 ropos `.|A-Z`", returns values as A, A.1, A.2, B, ... )
0 apos `format`, returns the absolute position of the item (the position from the first visible item) ( "1 apos ``", gets absolute position of the item )
0 rapos `delimiter|format|format|...`, returns the recursive absolute-position of the item (the position from the first visible item) ( "1 rapos `.|A-Z`", returns values as A, A.1, A.2, B, ... )
where:
  • `delimiter`, is a character to separated recursive-operators such as "rindex", "rpos", "ropos" and "rapos"
  • `format`, is a set of characters to be used for specifying the index
Additionally, it supports parent and root unary operators to access the values of parent or root items as explained:
parent (unary operator), refers to the parent item of the current item. This expression allows access to values or properties associated with the immediate parent in the hierarchy or structure ( "parent(1 index ``)", gets the index of the parent-item (1-based) ) (@since 4.3)
root (unary operator), refers to the root item of the current item's hierarchy. This expression allows access to values or properties of the highest-level item in the entire structure, regardless of how deeply nested the current item is ("root(%C0)", retrieves the caption of the first column for the root item) (@since 4.3)
Type:
  • string
Example
null {null}, the exontrol.Pivot.Options.groupByFormatCell option is used instead
"" {string}, the default group-by value gets displayed once the column gets grouped by
"upper(value)" {string}, the default group-by value (in upper case) gets displayed once the column gets grouped by
"value + ` &lt;fgcolor gray&gt;` + get(`count(current,rec,1)`)" {string}, the default group-by value plus the count of items within the group gets displayed once the column gets grouped by
GroupByFormatCell

Image :string

The Image property sets or gets the column's image. The Image property defines the name of the image the column displays in the column's header. The image can be added using the exontrol.HTMLPicture.Add method. The FormatImage property defines the expression to determine the images the cells of the column display. The Image property is equivalent with GetImage() and SetImage() methods. The ImageAlign property gets or sets the alignment of the column's image. The ImageSize property gets or sets the size of the column's image.
Type:
  • string
Example
"logo" {string}, displays the "logo" image. The image can be added using the exontrol.HTMLPicture.Add method
Image

ImageAlign :number

The ImageAlign property gets or sets the alignment of the column's image relative to its caption. The Caption property gets or sets the column's caption (ex-HTML format). The ImageAlign property is equivalent with GetImageAlign() and SetImageAlign() methods. The Column.ImageAlign property takes priority over the control's ImageAlign property, and the Cell.ImageAlign property takes priority over the Column.ImageAlign property. When the Cell.ImageAlign property is null, the alignment falls back to the Column.ImageAlign property, and if the Column.ImageAlign property is also null, the control's ImageAlign property is used. The ImageAlign property supports the following values:
  • 0, the image is on the left of the column's caption
  • 1, the image is on the right of the column's caption
  • 2, the image is on the top of the column's caption
  • 3, the image is on the bottom of the column's caption
By default, the image is aligned left to the caption.
Type:
  • number
Example
null {null}, the image is aligned left to the caption (default)
1 {number}, the image is displayed to the right of the column's caption
ImageAlign

ImageSize :any

The ImageSize property gets or sets the size of the column's image. The ImageSize property is equivalent with GetImageSize() and SetImageSize() methods. The Image property defines the name of the image the column displays in the column's header. The image can be added using the exontrol.HTMLPicture.Add method. The FormatImage property defines the expression to determine the images the cells of the column display. The ImageAlign property gets or sets the alignment of the column's image. The ImageSize property gets or sets the size of the column's image. The Column.ImageSize property takes priority over the control's ImageSize property, and the Cell.ImageSize property takes priority over the Column.ImageSize property. When the Cell.ImageSize property is null, the size falls back to the Column.ImageSize property, and if the Column.ImageSize property is also null, the control's ImageSize property is used. In short, the size priority is: Cell -> Column -> Control. The ImageSize property supports the following values:
  • {undefined}, Indicates that the control's imageSize option is considered, so the column's image is measured according to the control's imageSize option
  • {null}, Indicates that the column's image is displayed as it is (full-sized).
  • {number}, Specifies that the column's image is displayed into a square of giving size (same width and height). If 0 the object displays no image, if negative the column's image is stretched to giving square, else the column's picture is scaled to fit the giving rectangle.
  • {number[]}, Specifies an array of [aspect-width,aspect-height] type that defines the limits for width or/and height. The aspect-width and aspect-height define the width/height of the column's picture to scale or stretch to.

By default, the column's image is measured according to the control's imageSize option.

Type:
  • any
Example
null {null}, indicates that the object's image is displayed as it is (full-sized).
0 {number}, no image is displayed
64 {number}, the image is scaled to fit a 64 x 64 rectangle
-64 {number}, the image is strected to a 64 x 64 rectangle
[32,64] {array}, scales the image to the largest ratio-rectangle (32 x 64) that fits the client
[-32,-64] {array}, stretches the image to a 32 x 64 rectangle
ImageSize

(readonly) Index :number

The Index property retrieves the column's index. The Index property is equivalent with the GetIndex() method. The Index is a zero-based value that indicates the index of the column within its owner collection. The property can return -1, in case the column has been removed from its owner collection. The Index property is read-only, while the Position property may be changed. The VisibleItem and VisibleCount methods of Columns type, can be used to enumerate only the visible columns. The onchange("drag-column") event occurs when the user repositions a column via drag-and-drop, if the column's AllowDrag property is true and the "column-drag" action is enabled in AllowActions property.
Type:
  • number
Example
The following statements are equivalents:

 oColumn.GetIndex(), retrieves the column's index
 oColumn.Index, retrieves the column's index

where oColumn is an object of Column type
Index

Key :string

The Key property gets or sets the column's key. When the column's key is missing or empty its caption is used instead. The Key property may be used to identify a column within its owner collection. For instance, the Columns.Item(key) method requests a column by its index, identifier/key/caption or reference. The Key property is equivalent with GetKey() and SetKey() methods.
Type:
  • string
Example
"columnKey" {string}, assigns the "columnKey" key to the column
Key

Options :ColumnOptions

The Options property defines the column's options (visibility, caption, ...) at once. The Options property specifies an object of ColumnOptions type that holds information about the column, such as caption, image and so on. The Options property is equivalent with SetOptions() and GetOptions() methods.
Type:
Example
The following statements are equivalents:

 oPivot.Column(0).Options = {width: 32, allowSizing: false}, changes the column's width and make it un-resizable
 oPivot.Column(0).SetOptions({width: 32, allowSizing: false}), changes the column's width and make it un-resizable

where oPivot is an object of exontrol.Pivot type
 
Options

Pad :number|Array.<number>|string

The Pad property specifies the space between column's content and its borders. The Column.Pad property takes priority over the control's Pad property, and the Cell.Pad property takes priority over the Column.Pad property. When the Cell.Pad property is null, the padding falls back to the Column.Pad property, and if the Column.Pad property is also null, the control's Pad property is used. In short, the padding priority is: Cell -> Column -> Control. The Pad property is equivalent with GetPad() and SetPad() methods.
Type:
  • number | Array.<number> | string
Example
null {null}, indicates that the default padding value of [4,4] is applied
0 {number}, indicates no padding
"8,4" {string}, increases the element's width with 2 * 8-pixels and element's height with 2 * 4-pixels
[8,4] {array}, increases the element's width with 2 * 8-pixels and element's height with 2 * 4-pixels
Pad

PartialCheck :boolean

The PartialCheck property indicates whether the column supports partial-check feature. The CellHasCheck property must be set to 1 (the column shows a check-box for each cell) in order to enable the partial-check feature. Once the PartialCheck property is set to true, checking/unchecking a parent item's check-box will check/uncheck all its descendents.
Type:
  • boolean
Example
false {boolean}, the column supports no partial-check feature.
true {boolean}, the column supports partial-check feature, so once a parent item is checked/unchecked all its descendents are checked/unchecked.
PartialCheck

Position :number

The Position property gets or sets the column's position. The column's position is a zero-based value that indicates the position of the column within its owner collection. Setting the Position property changes the column's position within its owner collection. The Position property is equivalent with GetPosition() and SetPosition() methods. The Index property is read-only, while the Position property may be changed. The VisibleItem and VisibleCount methods of Columns type, can be used to enumerate only the visible columns. The onchange("drag-column") event occurs when the user repositions a column via drag-and-drop, if the column's AllowDrag property is true and the "column-drag" action is enabled in AllowActions property.
Type:
  • number
Example
null {null}, the null value has no effect
0 {number}, moves the column on the first position
Position

Shape :any

The Shape property changes the shape for the column itself (column's header). The Shape property is equivalent with GetShape() and SetShape() methods. The value could be any of the following:
  • {null}, no custom-shape is applied
  • the shape's name within the exontrol.Shapes.Pivot or exontrol.Shapes namespace
  • a CSS color
  • a JSON string-representation of an object of exontrol.Def.Shape type, for the column itself
  • an object of {normal,hover,click,disabled} type. The normal, hover, click and disabled are objects of exontrol.Def.Shape type

The Shapes/GetShapes()/SetShapes(value) {string}, defines the shapes each part of the control can display. The shapes field customizes the control's visual appearance. The Cell.Shape property changes the shape for the cell itself. The Column.CellShape property gets or sets the shape to apply on the column's body/data/cells. The Item.Shape property defines the shape for the item itself.

Type:
  • any
Example
null {null}, no custom shape is applied (default object's shape may be applied)
"" {string}, no custom shape is applied (no default object's shape is be applied)
"red" {string}, fills the object's background in red (CSS color)
'{"fillColor": "red"}' or '{"normal":{"fillColor": "red"}}' {string}, fills the object's background in red (JSON-representation of an object of exontrol.Def.Shape type)
"xxx" {string}, indicates that exontrol.Shapes.Pivot.xxx or exontrol.Shapes.xxx is applied on the object's background. If the xxx field is missing, no custom shape is applied (no default object's shape is be applied)
"Button" or exontrol.Shapes.Button {object}, applies the "Button" shape on the object as defined into exontrol.Shapes namespace (@since 5.2)
Shape

ShowIdem :string

The ShowIdem property defines the symbol used to indicate repeated captions, providing a clear visual cue for identical entries. The ShowIdem property is used to avoid redundancy in displaying identical captions within the same column. The ShowIdem property is particularly useful when the column contains multiple consecutive items with the same caption, as it helps to declutter the view and enhance readability. The ShowIdem property is equivalent to the "Ditto mark" or "quote character" commonly used in tabular data representation. The GetShowIdem and SetShowIdem methods are used to get and set the ShowIdem property respectively.
Type:
  • string
Since:
  • 4.2
Example
"" {string} or null {null}, no effect
" " {string}, empty string is displayed for repeated captions
"&lt;fgcolor lightgray&gt;&amp;#12291;" {string}, displays the " symbol (ditto mark or quote character) for repeated captions in light gray (idem).
ShowIdem

SortOrder :Pivot.SortOrderEnum

The SortOrder property gets or sets the column's sort-order. The SortOrder property is equivalent with GetSortOrder() and SetSortOrder() methods. The value could be any of the following:
  • 0 {number}, indicates an unsorted column
  • 1 {number}, sorts ascending the column
  • 2 {number}, sorts descending the column

The Sorts property of the Columns collection specifies the list of sorted columns within the tree-view. The onchange("sort-column") event notifies that a column has been sorted through user interaction by clicking its header. The AllowSort property enables or disables the user to sort the column by clicking its header. The SingleSort property specifies whether the control supports single or multiple-columns sort. By default, the column is not sorted(0).

Type:
Example
0 {number}, unsorts the column
2 {number}, sorts descending the column
SortOrder

SortType :Pivot.SortTypeEnum

The SortType property defines whether the column gets sorted as string, number or date, or by value, state or image. The SortType property is equivalent with GetSortType() and SetSortType() methods. The SortOrder property gets or sets the column's sort-order. The Pivot.SortTypeEnum type supports the following values (group A):
  • exSortString (0), the column's content is sorted as string (by default)
  • exSortNumeric (1), the column's content is sorted as numbers
  • exSortDate (2), the column's content is sorted as dates
Also, the Pivot.SortTypeEnum type supports the following additional values (group B):
  • exSortByValue (0x10), the column gets sorted by cell's value rather than cell's caption (the cell's caption include formatting)
  • exSortByState (0x20), The column gets sorted by cell's state (checked, unchecked) rather than cell's caption (the cell's caption include formatting)
  • exSortByImage (0x30), The column gets sorted by cell's image rather than cell's caption (the cell's caption include formatting)
(any value of group A can be combined with any value of group B).
Type:
Example
2 or exontrol.Pivot.SortTypeEnum.exSortDate {number}, sorts the columns as dates
0x11 or exontrol.Pivot.SortTypeEnum.exSortNumeric | exontrol.Pivot.SortTypeEnum.exSortByValue {number}, sorts the column by "value" as numbers. For instance, column's formatColumn property formats the values within the column(cell can display number-grouping, ex-HTML format and so on), so this option sorts the column's value rather than formatted-caption it displays
SortType

ToolTip :string

The ToolTip property defines the column's predefined tooltip. The column's tooltip is displayed once the mouse pointer hovers the column's header. The ToolTip property is equivalent with GetToolTip() and SetToolTip() methods. The Caption property gets or sets the column's caption (ex-HTML format).
Type:
  • string
Example
null {null}, the column's caption is shown once the mouse pointer hovers it, and it is not fully displayed
"" {string}, no tooltip for the column is displayed
"&lt;img&gt;image&lt;/img&gt; and text" {string}, the image and text is being shown once the mouse pointer hovers the column. The image can be added using the exontrol.HTMLPicture.Add method
ToolTip

Total :string

The Total property specifies a formula in the format 'aggregate(list, direction, formula)' or a format (supports all predefined functions of the Column's Format property) that defines the total fields applied to all unformatted and non-leaf cells within the column. Indicates a formula in the format 'aggregate(list, direction, formula)' or a format (supports all predefined functions of the Column.Format property) that defines the total fields applied to all unformatted and non-leaf cells within the column. The 'aggregate(list, direction, formula)' syntax is defined as follows:
aggregate, must be one of the following:
  • sum, performs addition of values
  • min, retrieves the minimum value
  • max, retrieves the maximum value
  • count, counts the number of items
  • avg, calculates the average of values
  • std, gets standard-deviation of numbers
  • unique, counts how many distinct values are in the set (@since 4.3)
list, must be one of the following:
  • a number expression that specifies the index of the item being referred
  • all, indicates all items, so the formula is being applied to all items
  • current, refers the current item
  • parent, refers to the parent item
  • root, refers to the root item (the root item has no parent items)
direction, must be one of the following:
  • dir, collects only direct descendents (child-items)
  • rec, collects recursivelly the leaf descendents ( leaf items ). A leaf item is an item with no child items
  • all, collects all descendents
Currently, the following items are excluded by aggregate functions:
not-sortable items. The Item.Sortable property specifies whether the item can be sorted ( a sortable item can change its position after sorting, while a not-sortable item keeps its position after sorting. not-selectable items. The Item.Selectable property specifies whether the user can selects/focus the specified item. divider items. The Item.Divider property specifies whether the item displays a single cell, instead displaying whole cells.
In conclusion, aggregate functions counts ONLY items that are sortable, selectable and not a divider-item.
For instance, the formula 'sum(current,rec,%2*%3)' computes the sum by multiplying the value of the column with index 2 by the value of the column with index 3. This formula is applied to all child cells of the column that are unformatted (Cell.Format property is empty) and do not belong to leaf items.
Type:
  • string
Since:
  • 3.3
Example
"sum(all,rec,value)", {string} returns the total of values of leaf-items within the same column
"sum(current,dir,value)", {string} returns the total of values of child-items (direct descendent) within the same column
"count(current,dir,1)", {string} gets the count of child-items
"`&lt;fgcolor gray&gt;` + (get(`sum(current,rec,%1)`) format ``)", {string} displays the sum for column 1 of leaf items in gray, formatted according to the control panel's regional settings
Total

Values :any

The Values property defines a list of predefined values the current column can display. While editing the column, the user can select a value from this predefined values only. The Values property can be specified as one of the following types:
  • {null}, indicates that the field is ignored
  • {string}, holds the list of predefined values separated by comma character. The list can include the value and its associated caption, using "caption(value)" format, such as "(0),rect(1),circle(2)" which displays nothing for 0, "rect" for 1 and "circle" for value 2
  • {array[string]}, holds a list of predefined values, as an array of [string] type
  • {map}, holds a map of (value,caption) type that specifies the caption to display for specified value, as an object of [value => caption]
Each individual caption supports ex-HTML format, so it can include images using the ex-HTML <img> tag. The following forms of values are equivalents:
  • "Central,East,West" {string},
  • "Central(Central),East(East),West(West)" {string},
  • ["Central","East","West"] {array[string]}
  • new Map([["Central","Central"], ["East","East"], ["West","West"]]) {map}
The Values property is used in conjunction with the AllowEdit property to create columns that allow users to select from predefined options. The GetValues() method returns a list of predefined values the current column can display. The SetValues() method defines a list of predefined values the current column can display.
Type:
  • any
Since:
  • 2.4
Example
null {null}, no effect
",Any,All" {string}, specifies that the column can display nothing, "Any" or "All"
"Be Right Back(BRB),By the Way(BTW),Laugh Out Loud(LOL)" {string}, shows "Be Right Back" for "BRB" value, "By the Way" for "BTW" and so on
"(0),&lt;img&gt;1st&lt;/img&gt;(1),&lt;img&gt;2nd&lt;/img&gt;(2)" {string}, specifies that the column displays nothing for 0, image with the key "1st" for the value 1, and image with the key "2nd" for the value 2
["","Any","All"] {array[string]}, specifies that the column can display nothing, "Any" or "All"
new Map([["BRB", "Be Right Back"], ["BTW","By the Way"], ["LOL","Laugh Out Loud"]]) {map}, shows "Be Right Back" for "BRB" value, "By the Way" for "BTW" and so on
Values

Visible :boolean

The Visible property shows or hides the column. The Visible property is equivalent with GetVisible() and SetVisible() methods. When a column is hidden, it is not displayed within the control's view. The VisibleItem and VisibleCount methods of Columns type, can be used to enumerate only the visible columns. The Width property gets or sets the width of a column, regardless whether the column is visible or hidden. The onchange("show-column") event is fired when the user clicks the checkbox in the control's Columns float bar (with ColumnsFloatBarVisible set to exColumnsFloatBarVisibleIncludeCheckColumns) to show or hide a column.
Type:
  • boolean
Example
false {boolean}, hides the column
true {boolean}, shows the column
Visible

Width :number

The Width property gets or sets the column's width. The Width property is equivalent with GetWidth() and SetWidth() methods. By default, the column's width is 128 pixels. The Visible property shows or hides the column. The AllowSizing property enables or disables the user to resize the column. The onchange("resize-column") event notifies that a column has been resized via UI interaction. Resizing the column via drag and drop is possible when the "column-resize" action is enabled in the AllowActions property.
Type:
  • number
Example
128 {number}, defines the column's width to 128 pixels.
Width

Methods

ChangeFilter(filterType, filter) → {boolean}

The ChangeFilter() method changes the column's filter and filterType at once (validates the view and applies the filter once). The FilterOnType property allows you to filter the column's data based on the typed characters. The Filter property filters for items based on values within this column. The FilterType property specifies the type of filter being applied to the column.
Parameters:
Name Type Description
filterType Pivot.FilterTypeEnum Indicates the type of the column's filter The Pivot.FilterTypeEnum type supports the following values and flags:
  • exAll (0), no filter is applied
  • exBlanks (1), includes only blank/empty items (a blank item is an empty item or an item that displays whitespace characters)
  • exNonBlanks (2), includes only non blank/empty items (a blank item is an empty item or an item that displays whitespace characters)
  • exPattern (3), includes only items that match the pattern. The Filter property defines the pattern. A pattern may contain the wild card characters '?' for any single character, '*' for zero or more occurrences of any character, '#' for any digit character, and [chars] indicates a group of characters. If any of the *, ?, # or | characters are preceded by a \ ( escape character ) it masks the character itself. Can be combined with exFilterDoCaseSensitive flag
  • exDate (4), includes only items that fit the date interval. The Filter property of the Column object defines the interval of dates being used to filter items. The interval of dates should be as [dateFrom] to [dateTo]. If the dateFrom value is missing, the control includes only the items before the dateTo date, if the dateTo value is missing, the control includes the items after the dateFrom date. If both dates ( dateFrom and dateTo ) are present, the control includes the items between this interval of dates. For instance, the "2/13/2004 to" includes all items after 2/13/2004 inclusive, or "2/13/2004 to Feb 14 2005" includes all items between 2/13/2004 and 2/14/2004.
  • exNumeric (5), includes only items of numeric type that check the expression. The expression supports operators like <, <=, =, <>, >= or > and numbers to define rules. For instance, the "> 10 < 100" filter indicates all numbers greater than 10 and less than 100.
  • exCheck (6), includes only checked-items, while Filter property is "1" or unchecked-items if Filter is "0"
  • exImage (10), includes only items that match the images within the Filter property.
  • exFilter (240), includes only items that match the Filter property. Can be combined with exFilterDoCaseSensitive flag
  • exFilterDoCaseSensitive (0x100), By default, the column's filter is case-insensitive. Specifies a case-sensitive column's filter. Can be combined with exPattern or exFilter flag
  • exFilterExclude (0x200), The flag indicates that the Exclude-checkbox of the column is checked. The flag indicates that the items that match the filter are excluded from the list.
The filter depends on the filterType as explained:
  • filterType = exFilter, the filter field indicates the list (separated by "|" character) of values to filter for. For instance, filter = "Cell A", filters for items with the caption "Cell A", filter = "Cell A|Cell B", filters for items with the caption "CellA" or "CellB".
  • filterType = exPattern, the filter field defines the wild-patterns to filter for items (separated by "|" character). A pattern-filter may contain wild card characters like '?' for any single character, '*' for zero or more occurrences of any character, '#' for any digit character. For instance: "A*" filters for items that begins with "A" or "a", "A*|B*" filters for items that starts with "A", "a", "B" or "b".
  • filterType = exDate, the filter field contains alternative interval-dates to filter for (separated by "|" character). An interval-date could be of "[dateFrom] [to] [dateTo]" or "[operator] date [operator date ...]" format. The "[dateFrom] [to] [dateTo]" format filter for items that fit the interval. For instance: "2/13/2004" filter only for items with the date on 2/13/2004, "2/13/2004 to", filter for items whose date is greater or equal with 2/13/2004, "to 2/13/2004" filter for items with the date less or equal with 2/13/2004. For instance: "2/13/2004 | 2/13/2005 to" filter for items with the date on 2/13/2004 or greater or equal with 2/13/2005. The "operator date [operator date ...]" format allows to filter using multiple operators as <, <=, =, <>, !=, >= or >. For instance: "> 2/13/2004" filter for items with the date greater than 2/13/2004, "> 2/13/2004 | <= 2/13/2002" filter for dates greater than 2/13/2004 or less or greater than 2/13/2002
  • filterType = exNumeric, the filter field specifies a list of numeric-rules to filter for (separated by "|" character). The format of filter field is "[operator] number [operator number ...]", which define numeric-rule, where operator is one of <, <=, =, <>, !=, >= or >. For instance, the "> 10" filters for numbers greater than 10, "> 10 < 100" filters for numbers greater than 10 and less than 100, "10|20|>50" filters for items that include 10, 20 or any number greater than 50
  • filterType = exCheck, the filter field specifies a list of states to filter for (separated by "|" character). The cell's state is "0" (unchecked), "1" (checked) and "2" (partial-checked). For instance: "1" filters for checked items, "1|2" filters for partially and checked items
  • filterType = exImage, the filter field defines the list of images (separated by "|" character) to filter for. The Cell.Image property specifies the image of the cell. For instance, "Al" filters for items that displays the "Al" picture/image, "Al|Peggy" filters for items that displays the "Al" or "Peggy" images. The exontrol.HTMLPicture.Add method adds named images to the control.
The filter field has no effect if the filterType field is exAll, exBlanks or exNonBlanks. The filter is case-sensitive, if the filterType includes the exFilterDoCaseSensitive flag.
filter string Specifies the values to filter for.
Returns:
Returns true, if the column's filter or filterType property has been changed
Type
boolean

Remove() → {Column}

The Remove() method removes the column itself from its collection. The Remove method of the Column object is equivalent of Columns.Remove(oColumn) method. The Remove() method returns the column itself, so you can use it in a statement such as oPivot.Column(0).Remove().Remove(), to remove the first column and then the new first column (the old second column) at once. The Columns.Clear() method removes all columns at once.
Returns:
Returns the column itself.
Type
Column
Example
The following statements are equivalents:

 oPivot.Column(0).Remove(), removes the first column from the control
 oPivot.Columns.Remove( oPivot.Column(0) ), removes the first column from the control

where oPivot is an object of exontrol.Pivot type
Remove

ToggleExpand()

The ToggleExpand() method toggles the column's expand state. The ToggleExpand() method expands the column if it's collapsed, or collapses the column if it's expanded. The Expanded property expands or collapses the column. The onchange("expand-column") event notifies that a column has been expanded or collapsed through UI interaction. When the column is expanded, the columns specified in the ExpandColumns property are shown. When the column is collapsed, the columns specified in the ExpandColumns property are hidden.
Example
column.ToggleExpand(); // toggles the column's expand state
ToggleExpand