0
|
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
|
2 <html>
|
|
3 <head>
|
|
4 <meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
|
5 <title>Namespace: oColumn - documentation</title>
|
|
6
|
|
7 <style type="text/css" media="screen">
|
|
8 @import "media/css/doc.css";
|
|
9 @import "media/css/shCore.css";
|
|
10 @import "media/css/shThemeDataTables.css";
|
|
11 </style>
|
|
12
|
|
13 <script type="text/javascript" src="media/js/shCore.js"></script>
|
|
14 <script type="text/javascript" src="media/js/shBrushJScript.js"></script>
|
|
15 <script type="text/javascript" src="media/js/jquery.js"></script>
|
|
16 <script type="text/javascript" src="media/js/doc.js"></script>
|
|
17 </head>
|
|
18 <body>
|
|
19 <div class="fw_container">
|
|
20
|
|
21 <a name="top"></a>
|
|
22 <div class="fw_header">
|
|
23 <h1 class="page-title">Namespace: oColumn</h1>
|
|
24 <h2 class="ancestors">Ancestry: <span class="ancestors"><a href="DataTable.html">DataTable</a> » <a href="DataTable.models.html">.models</a>.</span> » oColumn</h2>
|
|
25 <div class="page-info">
|
|
26 DataTables v1.9.4 documentation
|
|
27 </div>
|
|
28 </div>
|
|
29
|
|
30
|
|
31
|
|
32 <div class="fw_nav">
|
|
33 <h2>Navigation</h2>
|
|
34 <ul>
|
|
35 <li><a href="#top">Overview</a></li>
|
|
36 <li><a href="#summary">Summary</a><div><table cellpadding="5" border="0" cellspacing="0" width="100%"><tbody><tr><td>Classes (0)</td><td>Namespaces (0)</td></tr><tr><td>Properties (0)</td><td><a href="#summary_properties_static">Static properties (25)</a></td></tr><tr><td>Methods (0)</td><td>Static methods (0)</td></tr><tr><td>Events (0)</td><td></td></tr></tbody></table></div></li><li><a href="#details">Details</a><div><table cellpadding="5" border="0" cellspacing="0" width="100%"><tbody><tr><td>Properties (0)</td><td><a href="#summary_properties_static">Static properties (25)</a></td></tr><tr><td>Methods (0)</td><td>Static methods (0)</td></tr><tr><td>Events (0)</td><td></td></tr></tbody></table></div></li></ul>
|
|
37 <div style="margin-top: 10px;">
|
|
38 <input type="hidden" name="show_private" value="0">
|
|
39 <span id="private_label">Hiding</span> private elements
|
|
40 (<a id="private_toggle" href="">toggle</a>)
|
|
41 </span>
|
|
42 </div>
|
|
43 <div>
|
|
44 <input type="hidden" name="show_extended" value="1">
|
|
45 <span id="extended_label">Showing</span> extended elements
|
|
46 (<a id="extended_toggle" href="">toggle</a>)
|
|
47 </span>
|
|
48 </div>
|
|
49 </div>
|
|
50
|
|
51 <div class="fw_content">
|
|
52 <a name="overview"></a>
|
|
53 <div class="doc_overview">
|
|
54 <div class="nav_blocker"></div>
|
|
55 <p>Template object for the column information object in DataTables. This object
|
|
56 is held in the settings aoColumns array and contains all the information that
|
|
57 DataTables needs about each individual column.</p>
|
|
58
|
|
59 <p>Note that this object is related to <a href="DataTable.defaults.columns.html">DataTable.defaults.columns</a>
|
|
60 but this one is the internal data store for DataTables's cache of columns.
|
|
61 It should NOT be manipulated outside of DataTables. Any configuration should
|
|
62 be done through the initialisation options.</p><dl class="details">
|
|
63
|
|
64 </dl>
|
|
65
|
|
66 </div>
|
|
67
|
|
68
|
|
69 <div class="doc_summary">
|
|
70 <a name="summary"></a>
|
|
71 <h2>Summary</h2>
|
|
72
|
|
73 <div class="doc_group"><a name="summary_properties_static"></a><h3 class="subsection-title">Properties - static</h3>
|
|
74
|
|
75 <dl>
|
|
76 <dt class=" even"><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a href="#aDataSort">aDataSort</a></span><span class="type-sig"><span class="type-signature"> :array</span></span></dt><dd class=" even"><p>A list of the columns that sorting should occur on when this column
|
|
77 is sorted. That this property is an array allows multi-column sorting
|
|
78 to be defined for a column (for example first name / last name columns
|
|
79 would benefit from this). The values are integers pointing to the
|
|
80 columns to be sorted on (typically it will be a single integer pointing
|
|
81 at itself, but that doesn't need to be the case).</p></dd><dt class=" odd"><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a href="#asSorting">asSorting</a></span><span class="type-sig"><span class="type-signature"> :array</span></span></dt><dd class=" odd"><p>Define the sorting directions that are applied to the column, in sequence
|
|
82 as the column is repeatedly sorted upon - i.e. the first value is used
|
|
83 as the sorting direction when the column if first sorted (clicked on).
|
|
84 Sort it again (click again) and it will move on to the next index.
|
|
85 Repeat until loop.</p></dd><dt class=" even"><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a href="#bSearchable">bSearchable</a></span><span class="type-sig"><span class="type-signature"> :boolean</span></span></dt><dd class=" even"><p>Flag to indicate if the column is searchable, and thus should be included
|
|
86 in the filtering or not.</p></dd><dt class=" odd"><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a href="#bSortable">bSortable</a></span><span class="type-sig"><span class="type-signature"> :boolean</span></span></dt><dd class=" odd"><p>Flag to indicate if the column is sortable or not.</p></dd><dt class=" even"><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a href="#bUseRendered">bUseRendered</a></span><span class="type-sig"><span class="type-signature"> :boolean</span></span></dt><dd class=" even"><p><code>Deprecated</code> When using fnRender, you have two options for what
|
|
87 to do with the data, and this property serves as the switch. Firstly, you
|
|
88 can have the sorting and filtering use the rendered value (true - default),
|
|
89 or you can have the sorting and filtering us the original value (false). [<a href-"#bUseRendered">...</a>] </p></dd><dt class=" odd"><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a href="#bVisible">bVisible</a></span><span class="type-sig"><span class="type-signature"> :boolean</span></span></dt><dd class=" odd"><p>Flag to indicate if the column is currently visible in the table or not</p></dd><dt class=" even"><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a href="#fnCreatedCell">fnCreatedCell</a></span><span class="type-sig"><span class="type-signature"> :function</span></span></dt><dd class=" even"><p>Developer definable function that is called whenever a cell is created (Ajax source,
|
|
90 etc) or processed for input (DOM source). This can be used as a compliment to mRender
|
|
91 allowing you to modify the DOM element (add background colour for example) when the
|
|
92 element is available.</p></dd><dt class=" odd"><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a href="#fnGetData">fnGetData</a></span><span class="type-sig"><span class="type-signature"> :function</span></span></dt><dd class=" odd"><p>Function to get data from a cell in a column. You should <b>never</b>
|
|
93 access data directly through _aData internally in DataTables - always use
|
|
94 the method attached to this property. It allows mData to function as
|
|
95 required. This function is automatically assigned by the column
|
|
96 initialisation method</p></dd><dt class=" even"><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a href="#fnRender">fnRender</a></span><span class="type-sig"><span class="type-signature"> :function</span></span></dt><dd class=" even"><p><code>Deprecated</code> Custom display function that will be called for the
|
|
97 display of each cell in this column. [<a href-"#fnRender">...</a>] </p></dd><dt class=" odd"><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a href="#fnSetData">fnSetData</a></span><span class="type-sig"><span class="type-signature"> :function</span></span></dt><dd class=" odd"><p>Function to set data for a cell in the column. You should <b>never</b>
|
|
98 set the data directly to _aData internally in DataTables - always use
|
|
99 this method. It allows mData to function as required. This function
|
|
100 is automatically assigned by the column initialisation method</p></dd><dt class=" even"><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a href="#mData">mData</a></span><span class="type-sig"><span class="type-signature"> :function|int|string|null</span></span></dt><dd class=" even"><p>Property to read the value for the cells in the column from the data
|
|
101 source array / object. If null, then the default content is used, if a
|
|
102 function is given then the return from the function is used.</p></dd><dt class=" odd"><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a href="#mRender">mRender</a></span><span class="type-sig"><span class="type-signature"> :function|int|string|null</span></span></dt><dd class=" odd"><p>Partner property to mData which is used (only when defined) to get
|
|
103 the data - i.e. it is basically the same as mData, but without the
|
|
104 'set' option, and also the data fed to it is the result from mData.
|
|
105 This is the rendering method to match the data method of mData.</p></dd><dt class=" even"><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a href="#nTf">nTf</a></span><span class="type-sig"><span class="type-signature"> :node</span></span></dt><dd class=" even"><p>Unique footer TH/TD element for this column (if there is one). Not used
|
|
106 in DataTables as such, but can be used for plug-ins to reference the
|
|
107 footer for each column.</p></dd><dt class=" odd"><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a href="#nTh">nTh</a></span><span class="type-sig"><span class="type-signature"> :node</span></span></dt><dd class=" odd"><p>Unique header TH/TD element for this column - this is what the sorting
|
|
108 listener is attached to (if sorting is enabled.)</p></dd><dt class=" even"><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a href="#sClass">sClass</a></span><span class="type-sig"><span class="type-signature"> :string</span></span></dt><dd class=" even"><p>The class to apply to all TD elements in the table's TBODY for the column</p></dd><dt class=" odd"><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a href="#sContentPadding">sContentPadding</a></span><span class="type-sig"><span class="type-signature"> :string</span></span></dt><dd class=" odd"><p>When DataTables calculates the column widths to assign to each column,
|
|
109 it finds the longest string in each column and then constructs a
|
|
110 temporary table and reads the widths from that. The problem with this
|
|
111 is that "mmm" is much wider then "iiii", but the latter is a longer
|
|
112 string - thus the calculation can go wrong (doing it properly and putting
|
|
113 it into an DOM object and measuring that is horribly(!) slow). Thus as
|
|
114 a "work around" we provide this option. It will append its value to the
|
|
115 text that is found to be the longest string for the column - i.e. padding.</p></dd><dt class=" even"><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a href="#sDefaultContent">sDefaultContent</a></span><span class="type-sig"><span class="type-signature"> :string</span></span></dt><dd class=" even"><p>Allows a default value to be given for a column's data, and will be used
|
|
116 whenever a null data source is encountered (this can be because mData
|
|
117 is set to null, or because the data source itself is null).</p></dd><dt class=" odd"><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a href="#sName">sName</a></span><span class="type-sig"><span class="type-signature"> :string</span></span></dt><dd class=" odd"><p>Name for the column, allowing reference to the column by name as well as
|
|
118 by index (needs a lookup to work by name).</p></dd><dt class=" even"><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a href="#sSortDataType">sSortDataType</a></span><span class="type-sig"><span class="type-signature"> :string</span></span></dt><dd class=" even"><p>Custom sorting data type - defines which of the available plug-ins in
|
|
119 afnSortData the custom sorting will use - if any is defined.</p></dd><dt class=" odd"><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a href="#sSortingClass">sSortingClass</a></span><span class="type-sig"><span class="type-signature"> :string</span></span></dt><dd class=" odd"><p>Class to be applied to the header element when sorting on this column</p></dd><dt class=" even"><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a href="#sSortingClassJUI">sSortingClassJUI</a></span><span class="type-sig"><span class="type-signature"> :string</span></span></dt><dd class=" even"><p>Class to be applied to the header element when sorting on this column -
|
|
120 when jQuery UI theming is used.</p></dd><dt class=" odd"><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a href="#sTitle">sTitle</a></span><span class="type-sig"><span class="type-signature"> :string</span></span></dt><dd class=" odd"><p>Title of the column - what is seen in the TH element (nTh).</p></dd><dt class=" even"><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a href="#sType">sType</a></span><span class="type-sig"><span class="type-signature"> :string</span></span></dt><dd class=" even"><p>Column sorting and filtering type</p></dd><dt class=" odd"><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a href="#sWidth">sWidth</a></span><span class="type-sig"><span class="type-signature"> :string</span></span></dt><dd class=" odd"><p>Width of the column</p></dd><dt class=" even"><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a href="#sWidthOrig">sWidthOrig</a></span><span class="type-sig"><span class="type-signature"> :string</span></span></dt><dd class=" even"><p>Width of the column when it was first "encountered"</p></dd>
|
|
121 </dl></div>
|
|
122 </div>
|
|
123
|
|
124
|
|
125
|
|
126
|
|
127 <div class="doc_details">
|
|
128 <a name="details"></a>
|
|
129 <h2>Details</h2>
|
|
130 <div class="doc_group"><a name="details_properties"></a><h3 class="subsection-title">Properties - static</h3>
|
|
131 <dl>
|
|
132 <dt class=" even"><a name="aDataSort"></a><a name="aDataSort_details"></a><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a href="#aDataSort">aDataSort</a></span><span class="type-sig"><span class="type-signature"> :array</span></span></dt><dd class=" even"><p>A list of the columns that sorting should occur on when this column
|
|
133 is sorted. That this property is an array allows multi-column sorting
|
|
134 to be defined for a column (for example first name / last name columns
|
|
135 would benefit from this). The values are integers pointing to the
|
|
136 columns to be sorted on (typically it will be a single integer pointing
|
|
137 at itself, but that doesn't need to be the case).</p><div class="collapse_details"><dl class="details">
|
|
138
|
|
139 </dl>
|
|
140 </div></dd><dt class=" odd"><a name="asSorting"></a><a name="asSorting_details"></a><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a href="#asSorting">asSorting</a></span><span class="type-sig"><span class="type-signature"> :array</span></span></dt><dd class=" odd"><p>Define the sorting directions that are applied to the column, in sequence
|
|
141 as the column is repeatedly sorted upon - i.e. the first value is used
|
|
142 as the sorting direction when the column if first sorted (clicked on).
|
|
143 Sort it again (click again) and it will move on to the next index.
|
|
144 Repeat until loop.</p><div class="collapse_details"><dl class="details">
|
|
145
|
|
146 </dl>
|
|
147 </div></dd><dt class=" even"><a name="bSearchable"></a><a name="bSearchable_details"></a><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a href="#bSearchable">bSearchable</a></span><span class="type-sig"><span class="type-signature"> :boolean</span></span></dt><dd class=" even"><p>Flag to indicate if the column is searchable, and thus should be included
|
|
148 in the filtering or not.</p><div class="collapse_details"><dl class="details">
|
|
149
|
|
150 </dl>
|
|
151 </div></dd><dt class=" odd"><a name="bSortable"></a><a name="bSortable_details"></a><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a href="#bSortable">bSortable</a></span><span class="type-sig"><span class="type-signature"> :boolean</span></span></dt><dd class=" odd"><p>Flag to indicate if the column is sortable or not.</p><div class="collapse_details"><dl class="details">
|
|
152
|
|
153 </dl>
|
|
154 </div></dd><dt class=" even"><a name="bUseRendered"></a><a name="bUseRendered_details"></a><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a href="#bUseRendered">bUseRendered</a></span><span class="type-sig"><span class="type-signature"> :boolean</span></span></dt><dd class=" even"><p><code>Deprecated</code> When using fnRender, you have two options for what
|
|
155 to do with the data, and this property serves as the switch. Firstly, you
|
|
156 can have the sorting and filtering use the rendered value (true - default),
|
|
157 or you can have the sorting and filtering us the original value (false).</p>
|
|
158
|
|
159 <p>Please note that this option has now been deprecated and will be removed
|
|
160 in the next version of DataTables. Please use mRender / mData rather than
|
|
161 fnRender.</p><div class="collapse_details"><dl class="details">
|
|
162 <dt class="important">Deprecated</dt><dd class="yes-def">Yes</dd>
|
|
163 </dl>
|
|
164 </div></dd><dt class=" odd"><a name="bVisible"></a><a name="bVisible_details"></a><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a href="#bVisible">bVisible</a></span><span class="type-sig"><span class="type-signature"> :boolean</span></span></dt><dd class=" odd"><p>Flag to indicate if the column is currently visible in the table or not</p><div class="collapse_details"><dl class="details">
|
|
165
|
|
166 </dl>
|
|
167 </div></dd><dt id="DataTable.models.oColumn.fnCreatedCell" class=" even"><a name="fnCreatedCell"></a><a name="fnCreatedCell_details"></a><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a>fnCreatedCell</a></span><span class="type-sig"><span class="type-signature"> :function</span></span></span></dt><dd class=" even"><p>Developer definable function that is called whenever a cell is created (Ajax source,
|
|
168 etc) or processed for input (DOM source). This can be used as a compliment to mRender
|
|
169 allowing you to modify the DOM element (add background colour for example) when the
|
|
170 element is available.</p><div class="collapse_details"><dl class="details">
|
|
171
|
|
172 </dl>
|
|
173 <h5>Parameters:</h5>
|
|
174
|
|
175 <table class="params">
|
|
176 <thead>
|
|
177 <tr>
|
|
178 <th width="20"></th>
|
|
179 <th width="12%" class="bottom_border name">Name</th>
|
|
180 <th width="10%" class="bottom_border">Type</th>
|
|
181 <th width="10%" class="bottom_border">Attributes</th>
|
|
182 <th width="10%" class="bottom_border">Default</th>
|
|
183 <th class="last bottom_border">Description</th>
|
|
184 </tr>
|
|
185 </thead>
|
|
186
|
|
187 <tbody>
|
|
188 <tr class="even"><td class="number right_border"><div>1</div></td><td class="name">nTd</td><td class="type type-param">element</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>The TD node that has been created</p></td></tr><tr class="odd"><td class="number right_border"><div>2</div></td><td class="name">sData</td><td class="type type-param">*</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>The Data for the cell</p></td></tr><tr class="even"><td class="number right_border"><div>3</div></td><td class="name">oData</td><td class="type type-param">array | object</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>The data for the whole row</p></td></tr><tr class="odd"><td class="number right_border"><div>4</div></td><td class="name">iRow</td><td class="type type-param">int</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>The row index for the aoData data store</p></td></tr>
|
|
189 </tbody>
|
|
190 </table></div>
|
|
191 <dt id="DataTable.models.oColumn.fnGetData" class=" odd"><a name="fnGetData"></a><a name="fnGetData_details"></a><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a>fnGetData</a></span><span class="type-sig"><span class="type-signature"> :function</span></span></span></dt><dd class=" odd"><p>Function to get data from a cell in a column. You should <b>never</b>
|
|
192 access data directly through _aData internally in DataTables - always use
|
|
193 the method attached to this property. It allows mData to function as
|
|
194 required. This function is automatically assigned by the column
|
|
195 initialisation method</p><div class="collapse_details"><dl class="details">
|
|
196
|
|
197 </dl>
|
|
198 <h5>Parameters:</h5>
|
|
199
|
|
200 <table class="params">
|
|
201 <thead>
|
|
202 <tr>
|
|
203 <th width="20"></th>
|
|
204 <th width="12%" class="bottom_border name">Name</th>
|
|
205 <th width="10%" class="bottom_border">Type</th>
|
|
206 <th width="10%" class="bottom_border">Attributes</th>
|
|
207 <th width="10%" class="bottom_border">Default</th>
|
|
208 <th class="last bottom_border">Description</th>
|
|
209 </tr>
|
|
210 </thead>
|
|
211
|
|
212 <tbody>
|
|
213 <tr class="even"><td class="number right_border"><div>1</div></td><td class="name">oData</td><td class="type type-param">array | object</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>The data array/object for the array
|
|
214 (i.e. aoData[]._aData)</p></td></tr><tr class="odd"><td class="number right_border"><div>2</div></td><td class="name">sSpecific</td><td class="type type-param">string</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>The specific data type you want to get -
|
|
215 'display', 'type' 'filter' 'sort'</p></td></tr>
|
|
216 </tbody>
|
|
217 </table><h5>Returns:</h5><p class="returns"><p>The data for the cell from the given row's data</p></p></div>
|
|
218 <dt id="DataTable.models.oColumn.fnRender" class=" even"><a name="fnRender"></a><a name="fnRender_details"></a><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a>fnRender</a></span><span class="type-sig"><span class="type-signature"> :function</span></span></span></dt><dd class=" even"><p><code>Deprecated</code> Custom display function that will be called for the
|
|
219 display of each cell in this column.</p>
|
|
220
|
|
221 <p>Please note that this option has now been deprecated and will be removed
|
|
222 in the next version of DataTables. Please use mRender / mData rather than
|
|
223 fnRender.</p><div class="collapse_details"><dl class="details">
|
|
224 <dt class="important">Deprecated</dt><dd class="yes-def">Yes</dd>
|
|
225 </dl>
|
|
226 <h5>Parameters:</h5>
|
|
227
|
|
228 <table class="params">
|
|
229 <thead>
|
|
230 <tr>
|
|
231 <th width="20"></th>
|
|
232 <th width="12%" class="bottom_border name">Name</th>
|
|
233 <th width="10%" class="bottom_border">Type</th>
|
|
234 <th width="10%" class="bottom_border">Attributes</th>
|
|
235 <th width="10%" class="bottom_border">Default</th>
|
|
236 <th class="last bottom_border">Description</th>
|
|
237 </tr>
|
|
238 </thead>
|
|
239
|
|
240 <tbody>
|
|
241 <tr class="even"><td class="number right_border"><div>1</div></td><td class="name">o</td><td class="type type-param">object</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>Object with the following parameters:</p></td></tr><tr><td class="number right_border"></td><td class="name">o.iDataRow</td><td class="type type-param">int</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>The row in aoData</p></td></tr><tr><td class="number right_border"></td><td class="name">o.iDataColumn</td><td class="type type-param">int</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>The column in question</p></td></tr><tr><td class="number right_border"></td><td class="name">o.aData</td><td class="type type-param">array</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>The data for the row in question</p></td></tr><tr><td class="number right_border"></td><td class="name">o.oSettings</td><td class="type type-param">object</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>The settings object for this DataTables instance</p></td></tr>
|
|
242 </tbody>
|
|
243 </table><h5>Returns:</h5><p class="returns"><p>The string you which to use in the display</p></p></div>
|
|
244 <dt id="DataTable.models.oColumn.fnSetData" class=" odd"><a name="fnSetData"></a><a name="fnSetData_details"></a><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a>fnSetData</a></span><span class="type-sig"><span class="type-signature"> :function</span></span></span></dt><dd class=" odd"><p>Function to set data for a cell in the column. You should <b>never</b>
|
|
245 set the data directly to _aData internally in DataTables - always use
|
|
246 this method. It allows mData to function as required. This function
|
|
247 is automatically assigned by the column initialisation method</p><div class="collapse_details"><dl class="details">
|
|
248
|
|
249 </dl>
|
|
250 <h5>Parameters:</h5>
|
|
251
|
|
252 <table class="params">
|
|
253 <thead>
|
|
254 <tr>
|
|
255 <th width="20"></th>
|
|
256 <th width="12%" class="bottom_border name">Name</th>
|
|
257 <th width="10%" class="bottom_border">Type</th>
|
|
258 <th width="10%" class="bottom_border">Attributes</th>
|
|
259 <th width="10%" class="bottom_border">Default</th>
|
|
260 <th class="last bottom_border">Description</th>
|
|
261 </tr>
|
|
262 </thead>
|
|
263
|
|
264 <tbody>
|
|
265 <tr class="even"><td class="number right_border"><div>1</div></td><td class="name">oData</td><td class="type type-param">array | object</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>The data array/object for the array
|
|
266 (i.e. aoData[]._aData)</p></td></tr><tr class="odd"><td class="number right_border"><div>2</div></td><td class="name">sValue</td><td class="type type-param">*</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>Value to set</p></td></tr>
|
|
267 </tbody>
|
|
268 </table></div>
|
|
269 <dt class=" even"><a name="mData"></a><a name="mData_details"></a><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a href="#mData">mData</a></span><span class="type-sig"><span class="type-signature"> :function|int|string|null</span></span></dt><dd class=" even"><p>Property to read the value for the cells in the column from the data
|
|
270 source array / object. If null, then the default content is used, if a
|
|
271 function is given then the return from the function is used.</p><div class="collapse_details"><dl class="details">
|
|
272
|
|
273 </dl>
|
|
274 </div></dd><dt class=" odd"><a name="mRender"></a><a name="mRender_details"></a><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a href="#mRender">mRender</a></span><span class="type-sig"><span class="type-signature"> :function|int|string|null</span></span></dt><dd class=" odd"><p>Partner property to mData which is used (only when defined) to get
|
|
275 the data - i.e. it is basically the same as mData, but without the
|
|
276 'set' option, and also the data fed to it is the result from mData.
|
|
277 This is the rendering method to match the data method of mData.</p><div class="collapse_details"><dl class="details">
|
|
278
|
|
279 </dl>
|
|
280 </div></dd><dt class=" even"><a name="nTf"></a><a name="nTf_details"></a><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a href="#nTf">nTf</a></span><span class="type-sig"><span class="type-signature"> :node</span></span></dt><dd class=" even"><p>Unique footer TH/TD element for this column (if there is one). Not used
|
|
281 in DataTables as such, but can be used for plug-ins to reference the
|
|
282 footer for each column.</p><div class="collapse_details"><dl class="details">
|
|
283
|
|
284 </dl>
|
|
285 </div></dd><dt class=" odd"><a name="nTh"></a><a name="nTh_details"></a><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a href="#nTh">nTh</a></span><span class="type-sig"><span class="type-signature"> :node</span></span></dt><dd class=" odd"><p>Unique header TH/TD element for this column - this is what the sorting
|
|
286 listener is attached to (if sorting is enabled.)</p><div class="collapse_details"><dl class="details">
|
|
287
|
|
288 </dl>
|
|
289 </div></dd><dt class=" even"><a name="sClass"></a><a name="sClass_details"></a><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a href="#sClass">sClass</a></span><span class="type-sig"><span class="type-signature"> :string</span></span></dt><dd class=" even"><p>The class to apply to all TD elements in the table's TBODY for the column</p><div class="collapse_details"><dl class="details">
|
|
290
|
|
291 </dl>
|
|
292 </div></dd><dt class=" odd"><a name="sContentPadding"></a><a name="sContentPadding_details"></a><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a href="#sContentPadding">sContentPadding</a></span><span class="type-sig"><span class="type-signature"> :string</span></span></dt><dd class=" odd"><p>When DataTables calculates the column widths to assign to each column,
|
|
293 it finds the longest string in each column and then constructs a
|
|
294 temporary table and reads the widths from that. The problem with this
|
|
295 is that "mmm" is much wider then "iiii", but the latter is a longer
|
|
296 string - thus the calculation can go wrong (doing it properly and putting
|
|
297 it into an DOM object and measuring that is horribly(!) slow). Thus as
|
|
298 a "work around" we provide this option. It will append its value to the
|
|
299 text that is found to be the longest string for the column - i.e. padding.</p><div class="collapse_details"><dl class="details">
|
|
300
|
|
301 </dl>
|
|
302 </div></dd><dt class=" even"><a name="sDefaultContent"></a><a name="sDefaultContent_details"></a><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a href="#sDefaultContent">sDefaultContent</a></span><span class="type-sig"><span class="type-signature"> :string</span></span></dt><dd class=" even"><p>Allows a default value to be given for a column's data, and will be used
|
|
303 whenever a null data source is encountered (this can be because mData
|
|
304 is set to null, or because the data source itself is null).</p><div class="collapse_details"><dl class="details">
|
|
305
|
|
306 </dl>
|
|
307 </div></dd><dt class=" odd"><a name="sName"></a><a name="sName_details"></a><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a href="#sName">sName</a></span><span class="type-sig"><span class="type-signature"> :string</span></span></dt><dd class=" odd"><p>Name for the column, allowing reference to the column by name as well as
|
|
308 by index (needs a lookup to work by name).</p><div class="collapse_details"><dl class="details">
|
|
309
|
|
310 </dl>
|
|
311 </div></dd><dt class=" even"><a name="sSortDataType"></a><a name="sSortDataType_details"></a><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a href="#sSortDataType">sSortDataType</a></span><span class="type-sig"><span class="type-signature"> :string</span></span></dt><dd class=" even"><p>Custom sorting data type - defines which of the available plug-ins in
|
|
312 afnSortData the custom sorting will use - if any is defined.</p><div class="collapse_details"><dl class="details">
|
|
313
|
|
314 </dl>
|
|
315 </div></dd><dt class=" odd"><a name="sSortingClass"></a><a name="sSortingClass_details"></a><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a href="#sSortingClass">sSortingClass</a></span><span class="type-sig"><span class="type-signature"> :string</span></span></dt><dd class=" odd"><p>Class to be applied to the header element when sorting on this column</p><div class="collapse_details"><dl class="details">
|
|
316
|
|
317 </dl>
|
|
318 </div></dd><dt class=" even"><a name="sSortingClassJUI"></a><a name="sSortingClassJUI_details"></a><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a href="#sSortingClassJUI">sSortingClassJUI</a></span><span class="type-sig"><span class="type-signature"> :string</span></span></dt><dd class=" even"><p>Class to be applied to the header element when sorting on this column -
|
|
319 when jQuery UI theming is used.</p><div class="collapse_details"><dl class="details">
|
|
320
|
|
321 </dl>
|
|
322 </div></dd><dt class=" odd"><a name="sTitle"></a><a name="sTitle_details"></a><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a href="#sTitle">sTitle</a></span><span class="type-sig"><span class="type-signature"> :string</span></span></dt><dd class=" odd"><p>Title of the column - what is seen in the TH element (nTh).</p><div class="collapse_details"><dl class="details">
|
|
323
|
|
324 </dl>
|
|
325 </div></dd><dt class=" even"><a name="sType"></a><a name="sType_details"></a><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a href="#sType">sType</a></span><span class="type-sig"><span class="type-signature"> :string</span></span></dt><dd class=" even"><p>Column sorting and filtering type</p><div class="collapse_details"><dl class="details">
|
|
326
|
|
327 </dl>
|
|
328 </div></dd><dt class=" odd"><a name="sWidth"></a><a name="sWidth_details"></a><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a href="#sWidth">sWidth</a></span><span class="type-sig"><span class="type-signature"> :string</span></span></dt><dd class=" odd"><p>Width of the column</p><div class="collapse_details"><dl class="details">
|
|
329
|
|
330 </dl>
|
|
331 </div></dd><dt class=" even"><a name="sWidthOrig"></a><a name="sWidthOrig_details"></a><span class="type-attr"><span class="type-signature"><static> </span></span><span class="type-name"><a href="#sWidthOrig">sWidthOrig</a></span><span class="type-sig"><span class="type-signature"> :string</span></span></dt><dd class=" even"><p>Width of the column when it was first "encountered"</p><div class="collapse_details"><dl class="details">
|
|
332
|
|
333 </dl>
|
|
334 </div></dd>
|
|
335 </dl></div>
|
|
336 </div>
|
|
337
|
|
338 </div>
|
|
339
|
|
340 <div class="fw_footer">
|
|
341 DataTables: Copyright 2008-2012 Allan Jardine, all rights reserved<br>
|
|
342
|
|
343 Documentation generated by <a href="https://github.com/micmath/JSDoc">JSDoc 3</a> on
|
|
344 23th Sep 2012 - 14:27
|
|
345 with the <a href="http://datatables.net/">DataTables</a> template.
|
|
346 </div>
|
|
347 </body>
|
|
348 </html> |