annotate DataTables-1.9.4/extras/FixedColumns/docs/FixedColumns.html @ 2:3c160414da2e default tip

initial upload
author shiltemann
date Thu, 26 Feb 2015 14:05:23 +0100
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
3c160414da2e initial upload
shiltemann
parents:
diff changeset
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
3c160414da2e initial upload
shiltemann
parents:
diff changeset
2 <html>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
3 <head>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
4 <meta http-equiv="Content-type" content="text/html; charset=utf-8">
3c160414da2e initial upload
shiltemann
parents:
diff changeset
5 <title>Class: FixedColumns - documentation</title>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
6
3c160414da2e initial upload
shiltemann
parents:
diff changeset
7 <style type="text/css" media="screen">
3c160414da2e initial upload
shiltemann
parents:
diff changeset
8 @import "media/css/doc.css";
3c160414da2e initial upload
shiltemann
parents:
diff changeset
9 @import "media/css/shCore.css";
3c160414da2e initial upload
shiltemann
parents:
diff changeset
10 @import "media/css/shThemeDataTables.css";
3c160414da2e initial upload
shiltemann
parents:
diff changeset
11 </style>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
12
3c160414da2e initial upload
shiltemann
parents:
diff changeset
13 <script type="text/javascript" src="media/js/shCore.js"></script>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
14 <script type="text/javascript" src="media/js/shBrushJScript.js"></script>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
15 <script type="text/javascript" src="media/js/jquery.js"></script>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
16 <script type="text/javascript" src="media/js/doc.js"></script>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
17 </head>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
18 <body>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
19 <div class="fw_container">
3c160414da2e initial upload
shiltemann
parents:
diff changeset
20
3c160414da2e initial upload
shiltemann
parents:
diff changeset
21 <a name="top"></a>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
22 <div class="fw_header">
3c160414da2e initial upload
shiltemann
parents:
diff changeset
23 <h1 class="page-title">Class: FixedColumns</h1>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
24
3c160414da2e initial upload
shiltemann
parents:
diff changeset
25 <div class="page-info">
3c160414da2e initial upload
shiltemann
parents:
diff changeset
26 FixedColumns v2.0.3 documentation
3c160414da2e initial upload
shiltemann
parents:
diff changeset
27 </div>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
28 </div>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
29
3c160414da2e initial upload
shiltemann
parents:
diff changeset
30
3c160414da2e initial upload
shiltemann
parents:
diff changeset
31
3c160414da2e initial upload
shiltemann
parents:
diff changeset
32 <div class="fw_nav">
3c160414da2e initial upload
shiltemann
parents:
diff changeset
33 <h2>Navigation</h2>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
34 <ul>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
35 <li><a href="#top">Overview</a></li>
3c160414da2e initial upload
shiltemann
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>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
37 <div style="margin-top: 10px;">
3c160414da2e initial upload
shiltemann
parents:
diff changeset
38 <input type="hidden" name="show_private" value="0">
3c160414da2e initial upload
shiltemann
parents:
diff changeset
39 <span id="private_label">Hiding</span> private elements
3c160414da2e initial upload
shiltemann
parents:
diff changeset
40 (<a id="private_toggle" href="">toggle</a>)
3c160414da2e initial upload
shiltemann
parents:
diff changeset
41 </span>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
42 </div>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
43 <div>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
44 <input type="hidden" name="show_extended" value="1">
3c160414da2e initial upload
shiltemann
parents:
diff changeset
45 <span id="extended_label">Showing</span> extended elements
3c160414da2e initial upload
shiltemann
parents:
diff changeset
46 (<a id="extended_toggle" href="">toggle</a>)
3c160414da2e initial upload
shiltemann
parents:
diff changeset
47 </span>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
48 </div>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
49 </div>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
50
3c160414da2e initial upload
shiltemann
parents:
diff changeset
51 <div class="fw_content">
3c160414da2e initial upload
shiltemann
parents:
diff changeset
52 <a name="overview"></a>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
53 <div class="doc_overview">
3c160414da2e initial upload
shiltemann
parents:
diff changeset
54 <div class="nav_blocker"></div>
3c160414da2e initial upload
shiltemann
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
3c160414da2e initial upload
shiltemann
parents:
diff changeset
56 fix the left most column in place. This plug-in for DataTables provides
3c160414da2e initial upload
shiltemann
parents:
diff changeset
57 exactly this option (note for non-scrolling tables, please use the <br />
3c160414da2e initial upload
shiltemann
parents:
diff changeset
58 FixedHeader plug-in, which can fix headers, footers and columns). Key
3c160414da2e initial upload
shiltemann
parents:
diff changeset
59 features include:
3c160414da2e initial upload
shiltemann
parents:
diff changeset
60 <ul class="limit_length">
3c160414da2e initial upload
shiltemann
parents:
diff changeset
61 <li>Freezes the left or right most columns to the side of the table</li>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
62 <li>Option to freeze two or more columns</li>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
63 <li>Full integration with DataTables' scrolling options</li>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
64 <li>Speed - FixedColumns is fast in its operation</li>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
65 </ul></p><div class="collapse_details"><h3>Constructor</h3><dl class="details">
3c160414da2e initial upload
shiltemann
parents:
diff changeset
66
3c160414da2e initial upload
shiltemann
parents:
diff changeset
67 </dl>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
68 <h5>Parameters:</h5>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
69
3c160414da2e initial upload
shiltemann
parents:
diff changeset
70 <table class="params">
3c160414da2e initial upload
shiltemann
parents:
diff changeset
71 <thead>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
72 <tr>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
73 <th width="20"></th>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
74 <th width="12%" class="bottom_border name">Name</th>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
75 <th width="10%" class="bottom_border">Type</th>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
76 <th width="10%" class="bottom_border">Attributes</th>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
77 <th width="10%" class="bottom_border">Default</th>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
78 <th class="last bottom_border">Description</th>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
79 </tr>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
80 </thead>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
81
3c160414da2e initial upload
shiltemann
parents:
diff changeset
82 <tbody>
3c160414da2e initial upload
shiltemann
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>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
84 </tbody>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
85 </table><h5>Example:</h5>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
86 <div class="example-code">
3c160414da2e initial upload
shiltemann
parents:
diff changeset
87 <pre class="brush: js"> var oTable = $('#example').dataTable( {
3c160414da2e initial upload
shiltemann
parents:
diff changeset
88 "sScrollX": "100%"
3c160414da2e initial upload
shiltemann
parents:
diff changeset
89 } );
3c160414da2e initial upload
shiltemann
parents:
diff changeset
90 new FixedColumns( oTable );</pre>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
91 </div>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
92 </div>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
93 </dl><h3 class="subsection-title">Requires</h3>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
94 <ul>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
95 <li>module:jQuery</li><li>module:DataTables</li>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
96 </ul>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
97
3c160414da2e initial upload
shiltemann
parents:
diff changeset
98 </div>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
99
3c160414da2e initial upload
shiltemann
parents:
diff changeset
100
3c160414da2e initial upload
shiltemann
parents:
diff changeset
101 <div class="doc_summary">
3c160414da2e initial upload
shiltemann
parents:
diff changeset
102 <a name="summary"></a>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
103 <h2>Summary</h2>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
104
3c160414da2e initial upload
shiltemann
parents:
diff changeset
105 <div class="doc_group"><a name="summary_namespaces"></a><h3 class="subsection-title">Namespaces</h3>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
106 <dl>
3c160414da2e initial upload
shiltemann
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>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
108 </dl></div><div class="doc_group"><a name="summary_properties_static"></a><h3 class="subsection-title">Properties - static</h3>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
109
3c160414da2e initial upload
shiltemann
parents:
diff changeset
110 <dl>
3c160414da2e initial upload
shiltemann
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>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
112 </dl></div><div class="doc_group"><a name="summary_methods"></a><h3 class="subsection-title">Methods - instance</h3>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
113
3c160414da2e initial upload
shiltemann
parents:
diff changeset
114 <dl>
3c160414da2e initial upload
shiltemann
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
3c160414da2e initial upload
shiltemann
parents:
diff changeset
116 height matching. This function will have no effect when 'none' or 'auto' row height
3c160414da2e initial upload
shiltemann
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.
3c160414da2e initial upload
shiltemann
parents:
diff changeset
118 This is useful if you update the width of the table container. Note that FixedColumns will
3c160414da2e initial upload
shiltemann
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
3c160414da2e initial upload
shiltemann
parents:
diff changeset
120 automatically update the display whenever the host DataTable redraws.</p></dd>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
121 </dl>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
122 </div><div class="doc_group"><a name="summary_events"></a><h3 class="subsection-title">Events</h3>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
123 <dl>
3c160414da2e initial upload
shiltemann
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>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
125 </dd>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
126 </div>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
127 </div>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
128
3c160414da2e initial upload
shiltemann
parents:
diff changeset
129
3c160414da2e initial upload
shiltemann
parents:
diff changeset
130
3c160414da2e initial upload
shiltemann
parents:
diff changeset
131
3c160414da2e initial upload
shiltemann
parents:
diff changeset
132 <div class="doc_details">
3c160414da2e initial upload
shiltemann
parents:
diff changeset
133 <a name="details"></a>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
134 <h2>Details</h2>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
135 <div class="doc_group"><a name="details_properties"></a><h3 class="subsection-title">Properties - static</h3>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
136 <dl>
3c160414da2e initial upload
shiltemann
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">
3c160414da2e initial upload
shiltemann
parents:
diff changeset
138
3c160414da2e initial upload
shiltemann
parents:
diff changeset
139 </dl>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
140 </div></dd>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
141 </dl></div><div class="doc_group"><a name="details_methods"></a><h3 class="subsection-title">Methods - instance</h3>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
142 <dl>
3c160414da2e initial upload
shiltemann
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
3c160414da2e initial upload
shiltemann
parents:
diff changeset
144 height matching. This function will have no effect when 'none' or 'auto' row height
3c160414da2e initial upload
shiltemann
parents:
diff changeset
145 matching is used.</p><div class="collapse_details"><dl class="details">
3c160414da2e initial upload
shiltemann
parents:
diff changeset
146
3c160414da2e initial upload
shiltemann
parents:
diff changeset
147 </dl>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
148 <h5>Parameters:</h5>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
149
3c160414da2e initial upload
shiltemann
parents:
diff changeset
150 <table class="params">
3c160414da2e initial upload
shiltemann
parents:
diff changeset
151 <thead>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
152 <tr>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
153 <th width="20"></th>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
154 <th width="12%" class="bottom_border name">Name</th>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
155 <th width="10%" class="bottom_border">Type</th>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
156 <th width="10%" class="bottom_border">Attributes</th>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
157 <th width="10%" class="bottom_border">Default</th>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
158 <th class="last bottom_border">Description</th>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
159 </tr>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
160 </thead>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
161
3c160414da2e initial upload
shiltemann
parents:
diff changeset
162 <tbody>
3c160414da2e initial upload
shiltemann
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>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
164 </tbody>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
165 </table><h5>Example:</h5>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
166 <div class="example-code">
3c160414da2e initial upload
shiltemann
parents:
diff changeset
167 <pre class="brush: js"> var oTable = $('#example').dataTable( {
3c160414da2e initial upload
shiltemann
parents:
diff changeset
168 "sScrollX": "100%"
3c160414da2e initial upload
shiltemann
parents:
diff changeset
169 } );
3c160414da2e initial upload
shiltemann
parents:
diff changeset
170 var oFC = new FixedColumns( oTable );
3c160414da2e initial upload
shiltemann
parents:
diff changeset
171
3c160414da2e initial upload
shiltemann
parents:
diff changeset
172 // manipulate the table - mark the row as needing an update then update the table
3c160414da2e initial upload
shiltemann
parents:
diff changeset
173 // this allows the redraw performed by DataTables fnUpdate to recalculate the row
3c160414da2e initial upload
shiltemann
parents:
diff changeset
174 // height
3c160414da2e initial upload
shiltemann
parents:
diff changeset
175 oFC.fnRecalculateHeight();
3c160414da2e initial upload
shiltemann
parents:
diff changeset
176 oTable.fnUpdate( $('#example tbody tr:eq(0)')[0], ["insert date", 1, 2, 3 ... ]);</pre>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
177 </div>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
178 </div>
3c160414da2e initial upload
shiltemann
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.
3c160414da2e initial upload
shiltemann
parents:
diff changeset
180 This is useful if you update the width of the table container. Note that FixedColumns will
3c160414da2e initial upload
shiltemann
parents:
diff changeset
181 perform this function automatically when the window.resize event is fired.</p><div class="collapse_details"><dl class="details">
3c160414da2e initial upload
shiltemann
parents:
diff changeset
182
3c160414da2e initial upload
shiltemann
parents:
diff changeset
183 </dl>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
184 <h5>Example:</h5>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
185 <div class="example-code">
3c160414da2e initial upload
shiltemann
parents:
diff changeset
186 <pre class="brush: js"> var oTable = $('#example').dataTable( {
3c160414da2e initial upload
shiltemann
parents:
diff changeset
187 "sScrollX": "100%"
3c160414da2e initial upload
shiltemann
parents:
diff changeset
188 } );
3c160414da2e initial upload
shiltemann
parents:
diff changeset
189 var oFC = new FixedColumns( oTable );
3c160414da2e initial upload
shiltemann
parents:
diff changeset
190
3c160414da2e initial upload
shiltemann
parents:
diff changeset
191 // Resize the table container and then have FixedColumns adjust its layout....
3c160414da2e initial upload
shiltemann
parents:
diff changeset
192 $('#content').width( 1200 );
3c160414da2e initial upload
shiltemann
parents:
diff changeset
193 oFC.fnRedrawLayout();</pre>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
194 </div>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
195 </div>
3c160414da2e initial upload
shiltemann
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">
3c160414da2e initial upload
shiltemann
parents:
diff changeset
197
3c160414da2e initial upload
shiltemann
parents:
diff changeset
198 </dl>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
199 <h5>Parameters:</h5>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
200
3c160414da2e initial upload
shiltemann
parents:
diff changeset
201 <table class="params">
3c160414da2e initial upload
shiltemann
parents:
diff changeset
202 <thead>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
203 <tr>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
204 <th width="20"></th>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
205 <th width="12%" class="bottom_border name">Name</th>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
206 <th width="10%" class="bottom_border">Type</th>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
207 <th width="10%" class="bottom_border">Attributes</th>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
208 <th width="10%" class="bottom_border">Default</th>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
209 <th class="last bottom_border">Description</th>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
210 </tr>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
211 </thead>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
212
3c160414da2e initial upload
shiltemann
parents:
diff changeset
213 <tbody>
3c160414da2e initial upload
shiltemann
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>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
215 </tbody>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
216 </table><h5>Example:</h5>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
217 <div class="example-code">
3c160414da2e initial upload
shiltemann
parents:
diff changeset
218 <pre class="brush: js"> var oTable = $('#example').dataTable( {
3c160414da2e initial upload
shiltemann
parents:
diff changeset
219 "sScrollX": "100%"
3c160414da2e initial upload
shiltemann
parents:
diff changeset
220 } );
3c160414da2e initial upload
shiltemann
parents:
diff changeset
221 var oFC = new FixedColumns( oTable );
3c160414da2e initial upload
shiltemann
parents:
diff changeset
222
3c160414da2e initial upload
shiltemann
parents:
diff changeset
223 // You may want to do this after manipulating a row in the fixed column
3c160414da2e initial upload
shiltemann
parents:
diff changeset
224 oFC.fnSetRowHeight( $('#example tbody tr:eq(0)')[0], 50 );</pre>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
225 </div>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
226 </div>
3c160414da2e initial upload
shiltemann
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
3c160414da2e initial upload
shiltemann
parents:
diff changeset
228 automatically update the display whenever the host DataTable redraws.</p><div class="collapse_details"><dl class="details">
3c160414da2e initial upload
shiltemann
parents:
diff changeset
229
3c160414da2e initial upload
shiltemann
parents:
diff changeset
230 </dl>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
231 <h5>Example:</h5>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
232 <div class="example-code">
3c160414da2e initial upload
shiltemann
parents:
diff changeset
233 <pre class="brush: js"> var oTable = $('#example').dataTable( {
3c160414da2e initial upload
shiltemann
parents:
diff changeset
234 "sScrollX": "100%"
3c160414da2e initial upload
shiltemann
parents:
diff changeset
235 } );
3c160414da2e initial upload
shiltemann
parents:
diff changeset
236 var oFC = new FixedColumns( oTable );
3c160414da2e initial upload
shiltemann
parents:
diff changeset
237
3c160414da2e initial upload
shiltemann
parents:
diff changeset
238 // at some later point when the table has been manipulated....
3c160414da2e initial upload
shiltemann
parents:
diff changeset
239 oFC.fnUpdate();</pre>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
240 </div>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
241 </div>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
242
3c160414da2e initial upload
shiltemann
parents:
diff changeset
243 </dd>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
244 </div><div class="doc_group"><a name="details_events"></a><h3 class="subsection-title">Events</h3>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
245 <dl>
3c160414da2e initial upload
shiltemann
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">
3c160414da2e initial upload
shiltemann
parents:
diff changeset
247
3c160414da2e initial upload
shiltemann
parents:
diff changeset
248 </dl>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
249 <h5>Parameters:</h5>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
250
3c160414da2e initial upload
shiltemann
parents:
diff changeset
251 <table class="params">
3c160414da2e initial upload
shiltemann
parents:
diff changeset
252 <thead>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
253 <tr>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
254 <th width="20"></th>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
255 <th width="12%" class="bottom_border name">Name</th>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
256 <th width="10%" class="bottom_border">Type</th>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
257 <th width="10%" class="bottom_border">Attributes</th>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
258 <th width="10%" class="bottom_border">Default</th>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
259 <th class="last bottom_border">Description</th>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
260 </tr>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
261 </thead>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
262
3c160414da2e initial upload
shiltemann
parents:
diff changeset
263 <tbody>
3c160414da2e initial upload
shiltemann
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>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
265 </tbody>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
266 </table></div>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
267
3c160414da2e initial upload
shiltemann
parents:
diff changeset
268 </dd>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
269 </div>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
270 </div>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
271
3c160414da2e initial upload
shiltemann
parents:
diff changeset
272 </div>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
273
3c160414da2e initial upload
shiltemann
parents:
diff changeset
274 <div class="fw_footer">
3c160414da2e initial upload
shiltemann
parents:
diff changeset
275 FixedColumns: Copyright 2010-2011 Allan Jardine, all rights reserved<br>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
276
3c160414da2e initial upload
shiltemann
parents:
diff changeset
277 Documentation generated by <a href="https://github.com/micmath/JSDoc">JSDoc 3</a> on
3c160414da2e initial upload
shiltemann
parents:
diff changeset
278 23th Sep 2012 - 14:27
3c160414da2e initial upload
shiltemann
parents:
diff changeset
279 with the <a href="http://datatables.net/">DataTables</a> template.
3c160414da2e initial upload
shiltemann
parents:
diff changeset
280 </div>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
281 </body>
3c160414da2e initial upload
shiltemann
parents:
diff changeset
282 </html>