//Assume the table is a valid instance var table; //Add a column var col = table.addColumn(new Column("Sex", JST_TYPE_STRING)); col.possibleValues = new Map([new Pair("m", "Male"), new Pair("f", "Female")]);
Name | Type | Default | Description |
---|---|---|---|
header | String | An empty String | The header property |
type | enum | JST_TYPE_STRING | The type property |
width | String | Not specified | The width property |
align | String | JST_ALIGN_LEFT | The align property. Any String may be used, but there are some constants named JST_ALIGN_* to help |
valign | String | JST_VALIGN_MIDDLE | The valign property. Any String may be used, but there are some constants named JST_VALIGN_* to help |
possibleValues | Map | null | The possibleValues property |
Basic properties | |
index | Column's index on the table |
table | The column table reference |
Appearance properties | |
align | The align property |
cellTextClass | If indicated, this class will be used for this column's cell text |
cellTextStyle | If indicated, this style definition will be used for this column's cell text |
cropRepeated | If set to true, don't display repeated values on contiguous rows |
evenRowCellWithFunctionClass | If indicated, this class will be used for even row cells with functions |
header | The header property |
headerTextClass | If indicated, this class will be used for this column's header text |
headerTextStyle | If indicated, this style definition will be used for this column's header text |
highlightedEvenRowCellWithFunctionClass | If indicated, this class will be used for highlighted even row cells with functions |
highlightedOddRowCellWithFunctionClass | If indicated, this class will be used for highlighted odd row cells with functions |
oddRowCellWithFunctionClass | If indicated, this class will be used for odd row cells with functions |
valign | The valign property |
visible | A flag indicating if the column is visible |
width | The width property |
Behaviour and data entry properties | |
allowEmptyValue | A flag indicating if the column, when being edited, allows empty values |
editControl | An EditControl instance, the column editor |
editable | A flag indicating if the column can be edited |
encodingParser | A parser instance for data encoding |
parser | A parser instance for data editing |
possibleValues | The possibleValues property |
sortable | A flag indicating if the column can be sorted |
type | The type property |
Callback function properties | |
cellFunction | A function name to be called when the user clicks on the cell text |
getMaskFunction | A function reference to be called to retrieve the mask for the edit control |
validateFunction | A function reference to be called after data entry, to validate the input |
Parser obtention methods | |
getEncodingParser | Returns the column encoding parser |
getParser | Returns the column edit parser |
index
Column's index on the table. Should never be changed |
table
The column table reference. Should never be changed |