5 * Template object for the column information object in DataTables. This object
6 * is held in the settings aoColumns array and contains all the information that
7 * DataTables needs about each individual column.
9 * Note that this object is related to {@link DataTable.defaults.columns}
10 * but this one is the internal data store for DataTables's cache of columns.
11 * It should NOT be manipulated outside of DataTables. Any configuration should
12 * be done through the initialisation options.
15 DataTable.models.oColumn = {
17 * A list of the columns that sorting should occur on when this column
18 * is sorted. That this property is an array allows multi-column sorting
19 * to be defined for a column (for example first name / last name columns
20 * would benefit from this). The values are integers pointing to the
21 * columns to be sorted on (typically it will be a single integer pointing
22 * at itself, but that doesn't need to be the case).
28 * Define the sorting directions that are applied to the column, in sequence
29 * as the column is repeatedly sorted upon - i.e. the first value is used
30 * as the sorting direction when the column if first sorted (clicked on).
31 * Sort it again (click again) and it will move on to the next index.
38 * Flag to indicate if the column is searchable, and thus should be included
39 * in the filtering or not.
45 * Flag to indicate if the column is sortable or not.
51 * <code>Deprecated</code> When using fnRender, you have two options for what
52 * to do with the data, and this property serves as the switch. Firstly, you
53 * can have the sorting and filtering use the rendered value (true - default),
54 * or you can have the sorting and filtering us the original value (false).
56 * Please note that this option has now been deprecated and will be removed
57 * in the next version of DataTables. Please use mRender / mData rather than
65 * Flag to indicate if the column is currently visible in the table or not
71 * Flag to indicate to the type detection method if the automatic type
72 * detection should be used, or if a column type (sType) has been specified
80 * Developer definable function that is called whenever a cell is created (Ajax source,
81 * etc) or processed for input (DOM source). This can be used as a compliment to mRender
82 * allowing you to modify the DOM element (add background colour for example) when the
83 * element is available.
85 * @param {element} nTd The TD node that has been created
86 * @param {*} sData The Data for the cell
87 * @param {array|object} oData The data for the whole row
88 * @param {int} iRow The row index for the aoData data store
91 "fnCreatedCell": null,
94 * Function to get data from a cell in a column. You should <b>never</b>
95 * access data directly through _aData internally in DataTables - always use
96 * the method attached to this property. It allows mData to function as
97 * required. This function is automatically assigned by the column
98 * initialisation method
100 * @param {array|object} oData The data array/object for the array
101 * (i.e. aoData[]._aData)
102 * @param {string} sSpecific The specific data type you want to get -
103 * 'display', 'type' 'filter' 'sort'
104 * @returns {*} The data for the cell from the given row's data
110 * <code>Deprecated</code> Custom display function that will be called for the
111 * display of each cell in this column.
113 * Please note that this option has now been deprecated and will be removed
114 * in the next version of DataTables. Please use mRender / mData rather than
117 * @param {object} o Object with the following parameters:
118 * @param {int} o.iDataRow The row in aoData
119 * @param {int} o.iDataColumn The column in question
120 * @param {array} o.aData The data for the row in question
121 * @param {object} o.oSettings The settings object for this DataTables instance
122 * @returns {string} The string you which to use in the display
129 * Function to set data for a cell in the column. You should <b>never</b>
130 * set the data directly to _aData internally in DataTables - always use
131 * this method. It allows mData to function as required. This function
132 * is automatically assigned by the column initialisation method
134 * @param {array|object} oData The data array/object for the array
135 * (i.e. aoData[]._aData)
136 * @param {*} sValue Value to set
142 * Property to read the value for the cells in the column from the data
143 * source array / object. If null, then the default content is used, if a
144 * function is given then the return from the function is used.
145 * @type function|int|string|null
151 * Partner property to mData which is used (only when defined) to get
152 * the data - i.e. it is basically the same as mData, but without the
153 * 'set' option, and also the data fed to it is the result from mData.
154 * This is the rendering method to match the data method of mData.
155 * @type function|int|string|null
161 * Unique header TH/TD element for this column - this is what the sorting
162 * listener is attached to (if sorting is enabled.)
169 * Unique footer TH/TD element for this column (if there is one). Not used
170 * in DataTables as such, but can be used for plug-ins to reference the
171 * footer for each column.
178 * The class to apply to all TD elements in the table's TBODY for the column
185 * When DataTables calculates the column widths to assign to each column,
186 * it finds the longest string in each column and then constructs a
187 * temporary table and reads the widths from that. The problem with this
188 * is that "mmm" is much wider then "iiii", but the latter is a longer
189 * string - thus the calculation can go wrong (doing it properly and putting
190 * it into an DOM object and measuring that is horribly(!) slow). Thus as
191 * a "work around" we provide this option. It will append its value to the
192 * text that is found to be the longest string for the column - i.e. padding.
195 "sContentPadding": null,
198 * Allows a default value to be given for a column's data, and will be used
199 * whenever a null data source is encountered (this can be because mData
200 * is set to null, or because the data source itself is null).
204 "sDefaultContent": null,
207 * Name for the column, allowing reference to the column by name as well as
208 * by index (needs a lookup to work by name).
214 * Custom sorting data type - defines which of the available plug-ins in
215 * afnSortData the custom sorting will use - if any is defined.
219 "sSortDataType": 'std',
222 * Class to be applied to the header element when sorting on this column
226 "sSortingClass": null,
229 * Class to be applied to the header element when sorting on this column -
230 * when jQuery UI theming is used.
234 "sSortingClassJUI": null,
237 * Title of the column - what is seen in the TH element (nTh).
243 * Column sorting and filtering type
250 * Width of the column
257 * Width of the column when it was first "encountered"