Table Configuration
For each table the columns must be defined. Other options control the behavior of the overall table
- columns: column[], // an array of column definitions (see below)
name: the name of the column shown in the table header
field: the id in the column / of the data
editor: default: readonly, can be text, uprules, downrules, date, select (needs an array with options), versionletter, user, textline, design, ...
options: (for select) array with id, name pairs, for rules: singleSelect:true, showTitle:true
canBeModified: true, // if true, rows can be added and moved,
create: true, // if canBeModified also can add lines (with little icon)
showLineNumbers: true, // whether to show line numbers in front of each row
maxRows: -1, // if set to a value other than -1, the maximum number of rows which can be created
readonly_allowfocus: false // whether not editable cells can get focus (e.g. with tab)
Column Definition
Each column is defined by these settings
- name: e.g. "Column 1" header to be shown in UI and reports
- field: e.g. "column1" a variable name under which to store the values
- editor: e.g. "text" defines how and what data can be entered into a table cell of this column (see below)
- options: e.g. { "opt1":true } additional options, depending on the editor
Cell Editors
cell editors define how data can be entered and how it is displayed afterwards. The following editors exist
Editor | Description | Options |
---|---|---|
text | allows to enter rich text | |
textline | allows to enter a simple line of text (without formatting) | |
date | allows to select a date | |
NEW 2.0 date_today | allows to select a date. Initialized with today's date for new rows | |
NEW 2.0 today | read-only field with date of creation of row | |
select | allows to select a value from a dropdown | define the options the user can select { "id1":"option 1", "id2":"option 2", ....} "options":{ "setting":"dropdown_config" } |
user | allows to select a user | |
NEW 2.0 user_self | allows to select a user. Initialized with the user who created the row | |
NEW 2.0 self | read-only field with user who created the row | |
category (from 1.11 replaces rules:CAT1,...) | allows to select a category from the list of supplied categoires | "categories":["CAT1","CAT2"] "singleSelect": true, // if only one item can be selected |
uprules | allows to select items from the categories which are defined as up rules | "singleSelect": true, // if only one item can be selected "autolink":true // create up and down references if item are selected in table |
downrules | allows to select items from the categories which are defined as down rules | |
design | allows to select any item of any category marked as design | |
NEW 2.1 commentlog | The "comment log" editor allows each user to add comments with a time stamp and user id, sorted chronologically. | The option "append":true sorts them in the inverse order. |
NEW 2.1 current_version | The "current_version" column can be used to automatically fill the current version of an item in the table. | |
none | for readonly columns |