annotate DataTables-1.9.4/extras/FixedColumns/docs/FixedColumns.html @ 7:0f2b740536fb draft

Uploaded
author saskia-hiltemann
date Mon, 21 Aug 2017 09:16:07 -0400
parents ac5f9272033b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
2 <html>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
3 <head>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
4 <meta http-equiv="Content-type" content="text/html; charset=utf-8">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
5 <title>Class: FixedColumns - documentation</title>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
6
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
7 <style type="text/css" media="screen">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
8 @import "media/css/doc.css";
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
9 @import "media/css/shCore.css";
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
10 @import "media/css/shThemeDataTables.css";
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
11 </style>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
12
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
13 <script type="text/javascript" src="media/js/shCore.js"></script>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
14 <script type="text/javascript" src="media/js/shBrushJScript.js"></script>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
15 <script type="text/javascript" src="media/js/jquery.js"></script>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
16 <script type="text/javascript" src="media/js/doc.js"></script>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
17 </head>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
18 <body>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
19 <div class="fw_container">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
20
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
21 <a name="top"></a>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
22 <div class="fw_header">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
23 <h1 class="page-title">Class: FixedColumns</h1>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
24
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
25 <div class="page-info">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
26 FixedColumns v2.0.3 documentation
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
27 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
28 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
29
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
30
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
31
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
32 <div class="fw_nav">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
33 <h2>Navigation</h2>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
34 <ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
35 <li><a href="#top">Overview</a></li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
36 <li><a href="#summary">Summary</a><div><table cellpadding="5" border="0" cellspacing="0" width="100%"><tbody><tr><td>Classes (0)</td><td><a href="#summary_namespaces">Namespaces (3)</a></td></tr><tr><td>Properties (0)</td><td><a href="#summary_properties_static">Static properties (1)</a></td></tr><tr><td><a href="#summary_methods">Methods (4)</a></td><td>Static methods (0)</td></tr><tr><td><a href="#summary_events">Events (1)</a></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 (1)</a></td></tr><tr><td><a href="#summary_methods">Methods (4)</a></td><td>Static methods (0)</td></tr><tr><td><a href="#summary_events">Events (1)</a></td><td></td></tr></tbody></table></div></li></ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
37 <div style="margin-top: 10px;">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
38 <input type="hidden" name="show_private" value="0">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
39 <span id="private_label">Hiding</span> private elements
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
40 (<a id="private_toggle" href="">toggle</a>)
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
41 </span>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
42 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
43 <div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
44 <input type="hidden" name="show_extended" value="1">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
45 <span id="extended_label">Showing</span> extended elements
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
46 (<a id="extended_toggle" href="">toggle</a>)
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
47 </span>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
48 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
49 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
50
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
51 <div class="fw_content">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
52 <a name="overview"></a>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
53 <div class="doc_overview">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
54 <div class="nav_blocker"></div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
55 <dl><dt id="FixedColumns" class=" even"><a name="FixedColumns"></a><a name="FixedColumns_details"></a><span class="type-attr"><span class="type-signature"></span></span><span class="type-name"><a>new FixedColumns</a></span><span class="type-sig"><span class="signature">(oDT, <span class="optional">oInit</span>)</span><span class="type-signature"></span></span></span></dt><dd class=" even"><p>When making use of DataTables' x-axis scrolling feature, you may wish to
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
56 fix the left most column in place. This plug-in for DataTables provides
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
57 exactly this option (note for non-scrolling tables, please use the <br />
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
58 FixedHeader plug-in, which can fix headers, footers and columns). Key
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
59 features include:
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
60 <ul class="limit_length">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
61 <li>Freezes the left or right most columns to the side of the table</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
62 <li>Option to freeze two or more columns</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
63 <li>Full integration with DataTables' scrolling options</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
64 <li>Speed - FixedColumns is fast in its operation</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
65 </ul></p><div class="collapse_details"><h3>Constructor</h3><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
66
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
67 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
68 <h5>Parameters:</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
69
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
70 <table class="params">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
71 <thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
72 <tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
73 <th width="20"></th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
74 <th width="12%" class="bottom_border name">Name</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
75 <th width="10%" class="bottom_border">Type</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
76 <th width="10%" class="bottom_border">Attributes</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
77 <th width="10%" class="bottom_border">Default</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
78 <th class="last bottom_border">Description</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
79 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
80 </thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
81
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
82 <tbody>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
83 <tr class="even"><td class="number right_border"><div>1</div></td><td class="name">oDT</td><td class="type type-param">object</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>DataTables instance</p></td></tr><tr class="odd"><td class="number right_border"><div>2</div></td><td class="name">oInit</td><td class="type type-param">object</td><td class="attributes">Optional</td><td class="default">{}</td><td class="description last"><p>Configuration object for FixedColumns. Options are defined by <a href="FixedColumns.defaults.html">FixedColumns.defaults</a></p></td></tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
84 </tbody>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
85 </table><h5>Example:</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
86 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
87 <pre class="brush: js"> var oTable = $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
88 "sScrollX": "100%"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
89 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
90 new FixedColumns( oTable );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
91 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
92 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
93 </dl><h3 class="subsection-title">Requires</h3>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
94 <ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
95 <li>module:jQuery</li><li>module:DataTables</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
96 </ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
97
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
98 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
99
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
100
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
101 <div class="doc_summary">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
102 <a name="summary"></a>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
103 <h2>Summary</h2>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
104
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
105 <div class="doc_group"><a name="summary_namespaces"></a><h3 class="subsection-title">Namespaces</h3>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
106 <dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
107 <dt class="even"><span class="type-name"><a href="FixedColumns.defaults.html">defaults</a></span></dt><dd class="even"><p>FixedColumns default settings for initialisation</p></dd><dt class="odd"><span class="type-name"><a href="d3890ba7c4.html">dom</a></span></dt><dd class="odd"><p>DOM elements used by the class instance</p></dd><dt class="even"><span class="type-name"><a href="91bce7c4ad.html">s</a></span></dt><dd class="even"><p>Settings object which contains customisable information for FixedColumns instance</p></dd>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
108 </dl></div><div class="doc_group"><a name="summary_properties_static"></a><h3 class="subsection-title">Properties - static</h3>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
109
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
110 <dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
111 <dt class=" even"><span class="type-attr"><span class="type-signature">&lt;static, constant> </span></span><span class="type-name"><a href="#VERSION">VERSION</a></span><span class="type-sig"><span class="type-signature"> :String</span></span></dt><dd class=" even"><p>FixedColumns version</p></dd>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
112 </dl></div><div class="doc_group"><a name="summary_methods"></a><h3 class="subsection-title">Methods - instance</h3>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
113
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
114 <dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
115 <dt class=" even"><span class="type-attr"><span class="type-signature"></span></span><span class="type-name"><a href="#fnRecalculateHeight">fnRecalculateHeight</a></span><span class="type-sig"><span class="signature">(nTr)</span><span class="type-signature"> &rarr; {void}</span></span></dt><dd class=" even"><p>Mark a row such that it's height should be recalculated when using 'semiauto' row
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
116 height matching. This function will have no effect when 'none' or 'auto' row height
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
117 matching is used.</p></dd><dt class=" odd"><span class="type-attr"><span class="type-signature"></span></span><span class="type-name"><a href="#fnRedrawLayout">fnRedrawLayout</a></span><span class="type-sig"><span class="signature">()</span><span class="type-signature"> &rarr; {void}</span></span></dt><dd class=" odd"><p>Recalculate the resizes of the 3x3 grid that FixedColumns uses for display of the table.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
118 This is useful if you update the width of the table container. Note that FixedColumns will
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
119 perform this function automatically when the window.resize event is fired.</p></dd><dt class=" even"><span class="type-attr"><span class="type-signature"></span></span><span class="type-name"><a href="#fnSetRowHeight">fnSetRowHeight</a></span><span class="type-sig"><span class="signature">(nTarget, iHeight)</span><span class="type-signature"> &rarr; {void}</span></span></dt><dd class=" even"><p>Set the height of a given row - provides cross browser compatibility</p></dd><dt class=" odd"><span class="type-attr"><span class="type-signature"></span></span><span class="type-name"><a href="#fnUpdate">fnUpdate</a></span><span class="type-sig"><span class="signature">()</span><span class="type-signature"> &rarr; {void}</span></span></dt><dd class=" odd"><p>Update the fixed columns - including headers and footers. Note that FixedColumns will
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
120 automatically update the display whenever the host DataTable redraws.</p></dd>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
121 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
122 </div><div class="doc_group"><a name="summary_events"></a><h3 class="subsection-title">Events</h3>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
123 <dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
124 <dt class=" even"><span class="type-attr"></span><span class="type-name"><a href="#draw">draw</a></span><span class="type-sig"></span></dt><dd class=" even"><p>Event fired whenever FixedColumns redraws the fixed columns (i.e. clones the table elements from the main DataTable). This will occur whenever the DataTable that the FixedColumns instance is attached does its own draw.</p></dd>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
125 </dd>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
126 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
127 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
128
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
129
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
130
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
131
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
132 <div class="doc_details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
133 <a name="details"></a>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
134 <h2>Details</h2>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
135 <div class="doc_group"><a name="details_properties"></a><h3 class="subsection-title">Properties - static</h3>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
136 <dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
137 <dt class=" even"><a name="VERSION"></a><a name="VERSION_details"></a><span class="type-attr"><span class="type-signature">&lt;static, constant> </span></span><span class="type-name"><a href="#VERSION">VERSION</a></span><span class="type-sig"><span class="type-signature"> :String</span></span></dt><dd class=" even"><p>FixedColumns version</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
138
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
139 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
140 </div></dd>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
141 </dl></div><div class="doc_group"><a name="details_methods"></a><h3 class="subsection-title">Methods - instance</h3>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
142 <dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
143 <dt id="FixedColumns#fnRecalculateHeight" class=" even"><a name="fnRecalculateHeight"></a><a name="fnRecalculateHeight_details"></a><span class="type-attr"><span class="type-signature"></span></span><span class="type-name"><a>fnRecalculateHeight</a></span><span class="type-sig"><span class="signature">(nTr)</span><span class="type-signature"> &rarr; {void}</span></span></span></dt><dd class=" even"><p>Mark a row such that it's height should be recalculated when using 'semiauto' row
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
144 height matching. This function will have no effect when 'none' or 'auto' row height
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
145 matching is used.</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
146
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
147 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
148 <h5>Parameters:</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
149
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
150 <table class="params">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
151 <thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
152 <tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
153 <th width="20"></th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
154 <th width="12%" class="bottom_border name">Name</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
155 <th width="10%" class="bottom_border">Type</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
156 <th width="10%" class="bottom_border">Attributes</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
157 <th width="10%" class="bottom_border">Default</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
158 <th class="last bottom_border">Description</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
159 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
160 </thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
161
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
162 <tbody>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
163 <tr class="even"><td class="number right_border"><div>1</div></td><td class="name">nTr</td><td class="type type-param">Node</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>TR element that should have it's height recalculated</p></td></tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
164 </tbody>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
165 </table><h5>Example:</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
166 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
167 <pre class="brush: js"> var oTable = $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
168 "sScrollX": "100%"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
169 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
170 var oFC = new FixedColumns( oTable );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
171
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
172 // manipulate the table - mark the row as needing an update then update the table
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
173 // this allows the redraw performed by DataTables fnUpdate to recalculate the row
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
174 // height
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
175 oFC.fnRecalculateHeight();
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
176 oTable.fnUpdate( $('#example tbody tr:eq(0)')[0], ["insert date", 1, 2, 3 ... ]);</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
177 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
178 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
179 <dt id="FixedColumns#fnRedrawLayout" class=" odd"><a name="fnRedrawLayout"></a><a name="fnRedrawLayout_details"></a><span class="type-attr"><span class="type-signature"></span></span><span class="type-name"><a>fnRedrawLayout</a></span><span class="type-sig"><span class="signature">()</span><span class="type-signature"> &rarr; {void}</span></span></span></dt><dd class=" odd"><p>Recalculate the resizes of the 3x3 grid that FixedColumns uses for display of the table.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
180 This is useful if you update the width of the table container. Note that FixedColumns will
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
181 perform this function automatically when the window.resize event is fired.</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
182
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
183 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
184 <h5>Example:</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
185 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
186 <pre class="brush: js"> var oTable = $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
187 "sScrollX": "100%"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
188 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
189 var oFC = new FixedColumns( oTable );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
190
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
191 // Resize the table container and then have FixedColumns adjust its layout....
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
192 $('#content').width( 1200 );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
193 oFC.fnRedrawLayout();</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
194 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
195 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
196 <dt id="FixedColumns#fnSetRowHeight" class=" even"><a name="fnSetRowHeight"></a><a name="fnSetRowHeight_details"></a><span class="type-attr"><span class="type-signature"></span></span><span class="type-name"><a>fnSetRowHeight</a></span><span class="type-sig"><span class="signature">(nTarget, iHeight)</span><span class="type-signature"> &rarr; {void}</span></span></span></dt><dd class=" even"><p>Set the height of a given row - provides cross browser compatibility</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
197
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
198 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
199 <h5>Parameters:</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
200
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
201 <table class="params">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
202 <thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
203 <tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
204 <th width="20"></th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
205 <th width="12%" class="bottom_border name">Name</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
206 <th width="10%" class="bottom_border">Type</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
207 <th width="10%" class="bottom_border">Attributes</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
208 <th width="10%" class="bottom_border">Default</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
209 <th class="last bottom_border">Description</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
210 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
211 </thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
212
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
213 <tbody>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
214 <tr class="even"><td class="number right_border"><div>1</div></td><td class="name">nTarget</td><td class="type type-param">Node</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>TR element that should have it's height recalculated</p></td></tr><tr class="odd"><td class="number right_border"><div>2</div></td><td class="name">iHeight</td><td class="type type-param">int</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>Height in pixels to set</p></td></tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
215 </tbody>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
216 </table><h5>Example:</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
217 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
218 <pre class="brush: js"> var oTable = $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
219 "sScrollX": "100%"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
220 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
221 var oFC = new FixedColumns( oTable );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
222
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
223 // You may want to do this after manipulating a row in the fixed column
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
224 oFC.fnSetRowHeight( $('#example tbody tr:eq(0)')[0], 50 );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
225 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
226 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
227 <dt id="FixedColumns#fnUpdate" class=" odd"><a name="fnUpdate"></a><a name="fnUpdate_details"></a><span class="type-attr"><span class="type-signature"></span></span><span class="type-name"><a>fnUpdate</a></span><span class="type-sig"><span class="signature">()</span><span class="type-signature"> &rarr; {void}</span></span></span></dt><dd class=" odd"><p>Update the fixed columns - including headers and footers. Note that FixedColumns will
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
228 automatically update the display whenever the host DataTable redraws.</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
229
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
230 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
231 <h5>Example:</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
232 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
233 <pre class="brush: js"> var oTable = $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
234 "sScrollX": "100%"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
235 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
236 var oFC = new FixedColumns( oTable );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
237
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
238 // at some later point when the table has been manipulated....
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
239 oFC.fnUpdate();</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
240 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
241 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
242
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
243 </dd>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
244 </div><div class="doc_group"><a name="details_events"></a><h3 class="subsection-title">Events</h3>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
245 <dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
246 <dt id="FixedColumns#event:draw" class=" even"><a name="draw"></a><a name="draw_details"></a><span class="type-attr"></span><span class="type-name"><a>draw</a></span><span class="type-sig"></span></span></dt><dd class=" even"><p>Event fired whenever FixedColumns redraws the fixed columns (i.e. clones the table elements from the main DataTable). This will occur whenever the DataTable that the FixedColumns instance is attached does its own draw.</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
247
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
248 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
249 <h5>Parameters:</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
250
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
251 <table class="params">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
252 <thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
253 <tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
254 <th width="20"></th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
255 <th width="12%" class="bottom_border name">Name</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
256 <th width="10%" class="bottom_border">Type</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
257 <th width="10%" class="bottom_border">Attributes</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
258 <th width="10%" class="bottom_border">Default</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
259 <th class="last bottom_border">Description</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
260 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
261 </thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
262
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
263 <tbody>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
264 <tr class="even"><td class="number right_border"><div>1</div></td><td class="name">e</td><td class="type type-param">event</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>jQuery event object</p></td></tr><tr class="odd"><td class="number right_border"><div>2</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>Event parameters from FixedColumns</p></td></tr><tr><td class="number right_border"></td><td class="name">o.leftClone</td><td class="type type-param">object</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>Instance's object dom.clone.left for easy reference. This object contains references to the left fixed clumn column's nodes</p></td></tr><tr><td class="number right_border"></td><td class="name">o.rightClone</td><td class="type type-param">object</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>Instance's object dom.clone.right for easy reference. This object contains references to the right fixed clumn column's nodes</p></td></tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
265 </tbody>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
266 </table></div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
267
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
268 </dd>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
269 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
270 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
271
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
272 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
273
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
274 <div class="fw_footer">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
275 FixedColumns: Copyright 2010-2011 Allan Jardine, all rights reserved<br>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
276
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
277 Documentation generated by <a href="https://github.com/micmath/JSDoc">JSDoc 3</a> on
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
278 23th Sep 2012 - 14:27
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
279 with the <a href="http://datatables.net/">DataTables</a> template.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
280 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
281 </body>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
282 </html>