Class: Column

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

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

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

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

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

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

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

GetCaption() → {string}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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, ... 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, ... 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, ... 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, ... 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 )
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

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

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, ... 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, ... 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, ... 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, ... 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 )
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

GetImage() → {string}

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

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

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

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

GetKey() → {string}

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

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

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

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

GetPosition() → {any}

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

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

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

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

GetToolTip() → {string}

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

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

GetWidth() → {number}

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

Remove()

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

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

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)

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

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

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

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

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)

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)

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

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)

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

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.

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

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

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.

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

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.

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")

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)

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")

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, ... 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, ... 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, ... 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, ... 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 )
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

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

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, ... 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, ... 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, ... 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, ... 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 )
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

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.

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

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

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

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
 

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

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.

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

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

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

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

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

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

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.

ToggleExpand()

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