Column class (Tree)

Column(oColumns, oOptions)

new Column(oColumns, oOptions)

The Column object holds information(options) about a column within the control. The Add(oColumnOpts) 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.

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
Column

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)
Parameters:
Name Type Description
filterType Tree.FilterTypeEnum Indicates the type of the column's filter The Tree.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 field 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's 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
ChangeFilter

GetAllowDrag() → {boolean}

The GetAllowDrag() method specifies whether the column is dragable
Returns:
Returns true, if the column is dragable, else it returns false
Type
boolean
GetAllowDrag

GetAllowEdit() → {boolean}

The GetAllowEdit() method indicates whether the column is editable or readonly
Returns:
Returns true, if the column is editable or readonly
Type
boolean
GetAllowEdit

GetAllowGroupBy() → {boolean}

The GetAllowGroupBy() method specifies whether the column can be grouped by
Returns:
Returns true, if the column can be grouped by
Type
boolean
GetAllowGroupBy

GetAllowSizing() → {boolean}

The GetAllowSizing() method specifies whether the column is resizable or fixed
Returns:
Returns true, if the column is resizable, else it returns false
Type
boolean
GetAllowSizing

GetAllowSort() → {boolean}

The GetAllowSort() method specifies whether the column is sortable
Returns:
Returns true, if the column is sortable, else it returns false
Type
boolean
GetAllowSort

GetCaption() → {string}

The GetCaption() method returns the column's caption
Returns:
Returns column's exHTML caption
Type
string
GetCaption

GetCellCursor() → {string}

The GetCellCursor() method defines the mouse cursor for the column's body/data/cells.
Returns:
Returns the mouse-cursor for the column's body/data/cells.
Type
string
GetCellCursor

GetCellHasCheck() → {number}

The GetCellHasCheck() method indicates whether the check-box or radio-button for all cells within the column are visible or hidden.
Returns:
Specifies whether the check-box or radio-button for all cells within the column are visible or hidden, ex explained:
  • 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).
Type
number
GetCellHasCheck

GetCellShape() → {any}

The GetCellShape() method defines the shape to apply on the column's body/data/cells
Returns:
Returns the shape to apply on the column's body/data/cells, as explained:
  • {null}, no custom-shape is applied
  • the shape's name within the exontrol.Shape.Tree or exontrol.Shape 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
Type
any
GetCellShape

GetCursor() → {string}

The GetCursor() method defines the mouse cursor for the column itself (column's header).
Returns:
Returns the mouse-cursor for the column itself.
Type
string
GetCursor

GetDefaultSortOrder() → {number}

The GetDefaultDefaultSortOrder() method returns the column's default sort order
Returns:
Returns one of the following values:
  • 1 {number}, sorts ascending the column
  • 2 {number}, sorts descending the column
Type
number
GetDefaultSortOrder

GetDisplayExpandButton() → {boolean}

The GetDisplayExpandButton() method specifies whether the column displays its expand/collapse glyphs
Returns:
Returns true, if the column shows its expand/collapse glyphs, else it returns false
Type
boolean
GetDisplayExpandButton

GetDisplayFilterButton() → {boolean}

The GetDisplayFilterButton() method specifies whether the column shows the filter-button
Returns:
Returns true, if the column's filter button is visible
Type
boolean
GetDisplayFilterButton

GetEditOptions() → {EditOptions}

The GetEditOptions() method gets 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.Tree.EditOptions object.
Since:
  • 2.4
Returns:
Returns an object of EditOptions type that specifies the options to apply on the input element while editing the cell of the current column
Type
EditOptions
GetEditOptions

GetEnabled() → {boolean}

The GetEnabled() method determines whether the column is enabled or disabled
Returns:
Returns true if the column is enabled, or false if the column is disabled
Type
boolean
GetEnabled

GetExpandColumns() → {any}

The GetExpandColumns() method returns the list of columns to be shown when the current column is expanded
Returns:
Returns the list of columns to be shown when the current column is expanded, as 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
Type
any
GetExpandColumns

GetExpanded() → {boolean}

The GetExpanded() method determines whether the column is expanded or collapsed
Returns:
Returns true if the column is expanded, or false if the column is not expanded
Type
boolean
GetExpanded

GetFilter() → {string}

The GetFilter() method specifies the column's filter
Returns:
Returns the column's 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's 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
GetFilter

GetFilterList() → {Tree.FilterListEnum}

The GetFilterList() method specifies whether the column's drop down filter list includes visible or all items.
Returns:
Returns what type of items to include into column's drop down filter list The Tree.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 field. 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
Tree.FilterListEnum
GetFilterList

GetFilterOnType() → {boolean}

The GetFilterOnType() method allows you to filter the column's data based on the typed characters
Returns:
Specifies whether it allows you to filter the column's data based on the typed characters
Type
boolean
GetFilterOnType

GetFilterType() → {Tree.FilterTypeEnum}

The GetFilterType() method specifies the type of the column's filter
Returns:
Returns the type of the column's filter The Tree.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 field 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's 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
Tree.FilterTypeEnum
GetFilterType

GetFormat() → {string}

The GetFormat() method specifies the format to display the cells in the column
Returns:
Returns the format to display the cells in the column 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 ExpandItem 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
    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 SortableItem 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 SelectableItem property specifies whether the user can selects/focus the specified item. divider items. The ItemDivider 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
Type
string
GetFormat

GetFormatImage() → {string}

The GetFormatImage() method defines the expression to determine the images the column display
Since:
  • 1.6
Returns:
Returns the expression to determine the images the column display
Type
string
GetFormatImage

GetFormatText() → {exontrol.DrawTextFormatEnum}

The GetFormatText() method specifies the format to display the column's caption.
Returns:
Returns a value of exontrol.DrawTextFormatEnum type, that defines the format to display the column's caption. 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
GetFormatText

GetGroupByFormatCell() → {string}

The GetGroupByFormatCell() method the format of the cell to be displayed when the column gets grouped by
Returns:
Returns 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 ExpandItem 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
    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 SortableItem 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 SelectableItem property specifies whether the user can selects/focus the specified item. divider items. The ItemDivider 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
Type
string
GetGroupByFormatCell

GetImage() → {string}

The GetImage() method returns the column's image.
Returns:
Returns the name of the image the current column displays.
Type
string
GetImage

GetImageAlign() → {number}

The GetImageAlign() method specifies the alignment of the column's image relative to its caption.
Returns:
Returns the alignment of the column's image relative to its caption, as explained:
  • 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
Type
number
GetImageAlign

GetImageSize() → {any}

The GetImageSize() method defines the size of the column's image.
Returns:
Returns the size, range of limits the column's image is displayed as expalined:
  • {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.
Type
any
GetImageSize

GetIndex() → {number}

The GetIndex() method retrieves the column's index.
Returns:
Returns -1(the column has been removed) or the column's index (0-based) ()
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
GetIndex

GetKey() → {string}

The GetKey() method returns the column's key.
Returns:
Returns the column's exHTML key it displays
Type
string
GetKey

GetOptions() → {object}

The GetOptions() method returns the column's options at once
Returns:
Returns an object of ColumnOptions type
Type
object
Example
The following statements are equivalents:

 oColumn.GetOptions(), gets the column's options
 oColumn.Options, gets the column's options

where oColumn is an object of Column type
GetOptions

GetPad() → {number|Array.<number>|string}

The GetPad() method specifies the space between column's content and its borders.
Returns:
Returns a value that could be a numeric value, to pad horizontal and vertical size with the same value, or a "x,y" or [x,y] type to specify the padding on h/v size
Type
number | Array.<number> | string
GetPad

GetPartialCheck() → {boolean}

The GetPartialCheck() method indicates whether the column supports partial-check feature
Returns:
Returns true, if the column supports partial-check feature
Type
boolean
GetPartialCheck

GetPosition() → {any}

The GetPosition() method retrieves the column's position.
Returns:
Returns the column's position
Type
any
GetPosition

GetShape() → {any}

The GetShape() method defines the shape for the column itself (column's header)
Returns:
Returns the shape for the column itself, as explained:
  • {null}, no custom-shape is applied
  • the shape's name within the exontrol.Shape.Tree or exontrol.Shape 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
Type
any
GetShape

GetSortOrder() → {number}

The GetSortOrder() method returns the column's sort order
Returns:
Returns one of the following values:
  • 0 {number}, indicates an unsorted column
  • 1 {number}, sorts ascending the column
  • 2 {number}, sorts descending the column
Type
number
GetSortOrder

GetSortType() → {Tree.SortTypeEnum}

The GetSortType() method specifies whether the column gets sorted as string, number or date, or by value, state or image
Returns:
Returns the column's sort-as type The Tree.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 Tree.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
Tree.SortTypeEnum
GetSortType

GetToolTip() → {string}

The GetToolTip() method returns the column's predefined tooltip
Returns:
Returns column's predefined tooltip
Type
string
GetToolTip

GetTotal() → {string}

The GetTotal() method 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. 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 (Items.FormatCell property is empty) and do not belong to leaf items.
Since:
  • 3.3
Returns:
Returns the formula of "aggregate(list,direction,formula)" type that defines the total fields applied to all unformatted and non-leaf cells within the column, 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
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 SortableItem 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 SelectableItem property specifies whether the user can selects/focus the specified item. divider items. The ItemDivider 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.
Type
string
GetTotal

GetValues() → {any}

The GetValues() method returns 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.
Since:
  • 2.4
Returns:
Returns a list of predefined values the current column can display, as one of the following types: 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),1st(1),2nd(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
Type
any
GetValues

GetVisible() → {boolean}

The GetVisible() method determines whether the column is visible or hidden
Returns:
Returns true if the column is visible, or false if the column is not visible
Type
boolean
GetVisible

GetWidth() → {number}

The GetWidth() method returns the column's width
Returns:
Returns column's width
Type
number
GetWidth

Remove()

The Remove() method removes the column itself from its collection
Remove

SetAllowDrag(value)

The SetAllowDrag() method specifies whether the column is dragable
Parameters:
Name Type Description
value boolean Indicates true for a dragable column
Example
false {boolean}, the user can not drag the column
 true {boolean}, the column is dragable
SetAllowDrag

SetAllowEdit(value)

The SetAllowEdit() method enables or disables column's partial-check feature
Parameters:
Name Type Description
value boolean Specifies whether the column is editable or readonly
Example
false {boolean}, specifies a readonly column
 true {boolean}, the cells within the column are editable (if "edit" action is allowed)
SetAllowEdit

SetAllowGroupBy(value)

The SetAllowGroupBy() method specifies whether the column can be grouped by
Parameters:
Name Type Description
value boolean Indicates true if the column can be grouped by
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
SetAllowGroupBy

SetAllowSizing(value)

The SetAllowSizing() method specifies whether the column is resizable or fixed
Parameters:
Name Type Description
value boolean Indicates true for a resizable column or false for a fixed column(width)
Example
false {boolean}, the user can not resize the column
 true {boolean}, the column is resizable
SetAllowSizing

SetAllowSort(value)

The SetAllowSort() method specifies whether the column is sortable
Parameters:
Name Type Description
value boolean Indicates true for a sortable column
Example
false {boolean}, the user can not sort the column
 true {boolean}, the column is sortable
SetAllowSort

SetCaption(value)

The SetCaption() method changes the column's caption
Parameters:
Name Type Description
value string Specifies a new ex-HTML caption to be assigned to the column
Example
null {null}, indicates no caption
 "caption" {string}, declares a plain-caption
 "&lt;b>text&lt;/b>" {string}, displays the text in bold
 "&lt;img>logo&lt;/img>" {string}, displays the "logo" image. The image can be added using the exontrol.HTMLPicture.Add() method
SetCaption

SetCellCursor(value)

The SetCellCursor() method changes the mouse cursor for the column's body/data/cells.
Parameters:
Name Type Description
value any A string expression that defines the mouse cursor for the column's body/data/cells.
Example
"pointer" {string}, The cursor is a pointer that indicates a link (typically an image of a pointing hand)
SetCellCursor

SetCellHasCheck(value)

The SetCellHasCheck() method shows or hides check-boxes, or radio-buttons for all cells within the column
Parameters:
Name Type Description
value number A numeric expression that indicates whether the check-box or radio-button for all cells within the column are visible or hidden, as explained:
  • 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).
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 propery on 2 (sibling cells are considered a group of radio-cells)
SetCellHasCheck

SetCellShape(value)

The SetCellShape() method changes the shape to apply on the column's body/data/cells
Parameters:
Name Type Description
value any The value could be any of the following:
  • {null}, no custom-shape is applied
  • the shape's name within the exontrol.Shape.Tree or exontrol.Shape 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
SetCellShape

SetCursor(value)

The SetCursor() method changes the mouse cursor for the column itself (column's header).
Parameters:
Name Type Description
value any A string expression that defines the mouse cursor for the column itself.
Example
"pointer" {string}, The cursor is a pointer that indicates a link (typically an image of a pointing hand)
SetCursor

SetDefaultSortOrder(value)

The SetDefaultSortOrder() method changes the column's default sort-order
Parameters:
Name Type Description
value number Specifies the column's default sort order as one of the following:
  • 1 {number}, sorts ascending the column
  • 2 {number}, sorts descending the column
Example
1 {number}, sorts ascending the column
 2 {number}, sorts descending the column
SetDefaultSortOrder

SetDisplayExpandButton(value)

The SetDisplayExpandButton() method specifies whether the column displays its expand/collapse glyphs
Parameters:
Name Type Description
value boolean Indicates true for a resizable column or false for a fixed column(width)
Example
false {boolean}, the column hides its expand/collapse glyphs
 true {boolean}, the column shows its expand/collapse glyphs.
SetDisplayExpandButton

SetDisplayFilterButton(value)

The SetDisplayFilterButton() method shows or hides the column's filter button
Parameters:
Name Type Description
value boolean Specifies whether the column shows the filter-button
Example
false {boolean}, the column's filter button is hidden
 true {boolean}, the column's filter button is shown
SetDisplayFilterButton

SetEditOptions(value)

The SetEditOptions() method 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.Tree.EditOptions object.
Parameters:
Name Type Description
value EditOptions Specifies the options to apply on the input element while editing the cell of the current column, as an object of EditOptions type
Since:
  • 2.4
Example
null {null}, The exontrol.Tree.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
SetEditOptions

SetEnabled(value)

The SetEnabled() method enables or disables the column
Parameters:
Name Type Description
value boolean Indicates a boolean expression that specifies whether the column is enabled or disabled
Example
false {boolean}, disables the column
 true {boolean}, enables the column
SetEnabled

SetExpandColumns(value)

The SetExpandColumns() method specifies the list of columns to be shown when the current column is expanded
Parameters:
Name Type Description
value any Specifies the list of columns to be shown when the current column is expanded, as one 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
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.
SetExpandColumns

SetExpanded(value)

The SetExpanded() method expands or collapses the column
Parameters:
Name Type Description
value boolean Indicates a boolean expression that specifies whether the column is expanded or collapsed
Example
false {boolean}, the column is collapsed
 true {boolean}, the column is expanded
SetExpanded

SetFilter(value)

The SetFilter() method filters for items based on values within this column
Parameters:
Name Type Description
value string Specifies the values to filter for 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's 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.
SetFilter

SetFilterList(value)

The SetFilterList() method specifies whether the column's drop down filter list includes visible or all items.
Parameters:
Name Type Description
value Tree.FilterListEnum Indicates the type of items to include into column's drop down filter list The Tree.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 field. 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
Example
2 or exontrol.Tree.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.Tree.FilterTypeEnum.exCheck {number}, filters for checked-items (while filter field is "1") or unchecked-items (while filter field is "0")
SetFilterList

SetFilterOnType(value)

The SetFilterOnType() method allows you to filter the column's data based on the typed characters
Parameters:
Name Type Description
value boolean Specifies whether it is allowed to filter the column's data based on the typed characters
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)
SetFilterOnType

SetFilterType(value)

The SetFilterType() method changes the type of the column's filter
Parameters:
Name Type Description
value Tree.FilterTypeEnum Indicates the type of the column's filter The Tree.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 field 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's 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.
Example
2 or exontrol.Tree.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.Tree.FilterTypeEnum.exCheck {number}, filters for checked-items (while filter field is "1") or unchecked-items (while filter field is "0")
SetFilterType

SetFormat(value)

The SetFormat() method formats the column's content.
Parameters:
Name Type Description
value string Indicates the format to display the cells in the column 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 ExpandItem 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
    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 SortableItem 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 SelectableItem property specifies whether the user can selects/focus the specified item. divider items. The ItemDivider 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
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
SetFormat

SetFormatImage(value)

The SetFormatImage() method defines the expression to determine the images the column display. The exontrol.HTMLPicture.Add method adds new images to the control.
Parameters:
Name Type Description
value string Specifies the expression to determine the images the column display. The expression may be a combination of variables, constants, strings, dates and operators, and value. 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.
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
SetFormatImage

SetFormatText(value)

The SetFormatText() method changes the format to display the column's caption.
Parameters:
Name Type Description
value exontrol.DrawTextFormatEnum Specifies a value of exontrol.DrawTextFormatEnum value that defines the format to show the column's caption. 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.
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
SetFormatText

SetGroupByFormatCell(value)

The SetGroupByFormatCell() method specifies the format of the cell to be displayed when the column gets grouped by
Parameters:
Name Type Description
value string Specifies 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 ExpandItem 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
    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 SortableItem 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 SelectableItem property specifies whether the user can selects/focus the specified item. divider items. The ItemDivider 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
Example
null {null}, the control's 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 + ` <fgcolor gray>` + 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
SetGroupByFormatCell

SetImage(value)

The SetImage() method changes the column's image. The image can be added using the exontrol.HTMLPicture.Add() method
Parameters:
Name Type Description
value string Indicates the name of the image the column displays.
SetImage

SetImageAlign(value)

The SetImageAlign() method changes the alignment of the column's image relative to its caption.
Parameters:
Name Type Description
value number Indicates the alignment of the column's image relative to column's caption, as explained:
  • 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
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
SetImageAlign

SetImageSize(value)

The SetImageSize() method changes the size of the column's image.
Parameters:
Name Type Description
value any Indicates the size of the column's image as explained:
  • {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.
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
SetImageSize

SetKey(value)

The SetKey() method assigns a new key to the column
Parameters:
Name Type Description
value string Specifies a new key to be assigned to the column
SetKey

SetOptions(oOptions)

The SetOptions() method changes the column's options (visibility, caption, ...) at once
Parameters:
Name Type Description
oOptions object 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
Example
oTree.Column(0).Options = {width: 32, allowSizing: false}, changes the column's width and make it un-resizable
 oTree.Column(0).SetOptions({width: 32, allowSizing: false}), changes the column's width and make it un-resizable
 
SetOptions

SetPad(value)

The SetPad() method changes the column's padding or the space between column's content and its borders.
Parameters:
Name Type Description
value number | Array.<number> | string Specifies a value that could be a numeric value, to pad horizontal and vertical size with the same value, or a "x,y" or [x,y] type to specify the padding on h/v size
Example
null {null}, indicates that the default-padding field is used ([4,4])
  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
SetPad

SetPartialCheck(value)

The SetPartialCheck() method enables or disables column's partial-check feature
Parameters:
Name Type Description
value boolean Specifies whether the column supports partial-check feature
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.
SetPartialCheck

SetPosition(value)

The SetPosition() method changes the column's position.
Parameters:
Name Type Description
value number Specifies the column's new position
Example
null {null}, the null value has no effect
 0 {number}, moves the column on the first position
SetPosition

SetShape(value)

The SetShape() method changes the shape for the column itself (column's header)
Parameters:
Name Type Description
value any The value could be any of the following:
  • {null}, no custom-shape is applied
  • the shape's name within the exontrol.Shape.Tree or exontrol.Shape 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
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.Tree.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)
 exontrol.Shapes.Button {object}, applies the "Button" shape on the object as defined into exontrol.Shapes namespace
SetShape

SetSortOrder(value)

The SetSortOrder() method changes the column's sort-order
Parameters:
Name Type Description
value number Specifies the column's sort order as one of the following:
  • 0 {number}, indicates an unsorted column
  • 1 {number}, sorts ascending the column
  • 2 {number}, sorts descending the column
Example
0 {number}, unsorts the column
 2 {number}, sorts descending the column
SetSortOrder

SetSortType(value)

The SetSortType() method defines whether the column gets sorted as string, number or date, or by value, state or image
Parameters:
Name Type Description
value Tree.SortTypeEnum Indicates whether the column gets sorted as string, number or date, or by value, state or image The Tree.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 Tree.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)
Example
2 or exontrol.Tree.SortTypeEnum.exSortDate {number}, sorts the columns as dates
 0x11 or exontrol.Tree.SortTypeEnum.exSortNumeric | exontrol.Tree.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
SetSortType

SetToolTip(value)

The SetToolTip() method sets the column's predefined tooltip
Parameters:
Name Type Description
value string Specifies the new column's predefined tooltip
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>image&lt;/img> 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
SetToolTip

SetTotal(value)

The SetTotal() method 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.
Parameters:
Name Type Description
value string Indicates 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. 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
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 SortableItem 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 SelectableItem property specifies whether the user can selects/focus the specified item. divider items. The ItemDivider 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 (Items.FormatCell property is empty) and do not belong to leaf items.
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
 "`<fgcolor gray>` + (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
SetTotal

SetValues(values)

The SetValues() method 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.
Parameters:
Name Type Description
values any Specifies the list of predefined values as one of the following:
  • {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}
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),<img>1st</img>(1),<img>2nd</img>(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
SetValues

SetVisible(value)

The SetVisible() method shows or hides the column
Parameters:
Name Type Description
value boolean Indicates a boolean expression that specifies whether the column is visible or hidden
Example
false {boolean}, hides the column
 true {boolean}, shows the column
SetVisible

SetWidth(value)

The SetWidth() method changes the column's width
Parameters:
Name Type Description
value number Specifies the new column's width
Example
128 {number}, defines the column's width to 128 pixels.
SetWidth

ToggleExpand()

The ToggleExpand() method toggles the column's expand state. For instance, if the column is expanded, the ToggleExpand() method collapses the column.
ToggleExpand