bigridcolumn.html
来自「ajax 框价.是个好工具.javascript 矿家.可以用在任何平台.」· HTML 代码 · 共 436 行
HTML
436 行
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><!--Generated using api.website.xsl version 2003-07-17--><head><META http-equiv="Content-Type" content="text/html; charset=utf-8"><title>BiGridColumn</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><link type="text/css" rel="stylesheet" href="api.css"><script type="text/javascript"> function showDerivedClasses() { var ul = document.getElementById("api-derived-classes"); var lis = ul.childNodes; var l = lis.length; for (var i = 1; i < l; i++) lis[i].style.display = ""; lis[0].style.display = "none"; } </script></head><body><h1 id="BiGridColumn">BiGridColumn</h1><p>This class is used to describe columns for<code><a href="BiGrid.html">BiGrid</a></code> and<code><a href="BiTree.html">BiTree</a></code>.</p><p>This class extends <code><a href="BiObject.html">BiObject</a></code> and therefore all methods and fields available for <code><a href="BiObject.html">BiObject</a></code> are also available for <code>BiGridColumn</code>.</p><ul class="partial-class-tree"><li><code><a href="BiObject.html">BiObject</a></code><ul><li><code>BiGridColumn</code><ul id="api-derived-classes"></ul></li></ul></li></ul><h2>Constructor</h2><p><code> new BiGridColumn([<span class="methodArgument">sName</span>])</code></p><h3>Parameters</h3><table><thead><tr><td>Name</td><td>Type</td><td class="optional-header">Optional</td><td>Default</td><td>Descripton</td></tr></thead><tbody><tr><td><code>sName</code></td><td><code class="type">String</code></td><td class="optional-column"><img src="check.png" alt="checked"></td><td><code>Untitled</code></td><td>This is used for the text to to show on the <code><a href="BiGridHeader.html">header cell</a></code> for the column</td></tr></tbody></table><h2>Properties</h2><table><thead><tr><td>Name</td><td>Type</td><td class="get-header">get</td><td class="set-header">set</td><td>Descripton</td></tr></thead><tbody><tr><td><a name="align"></a><code>align</code></td><td><code class="type">String</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"><img src="check.png" alt="checked"></td><td>The alignment of the content inside the column.</td></tr><tr><td><a name="columnIndex"></a><code>columnIndex</code></td><td><code class="type">Number</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"></td><td>The index of the column in the grid columns collection. This is not neccessarily the same as the display order.</td></tr><tr><td><a name="grid"></a><code>grid</code></td><td><code class="type"> <code><a href="BiAbstractGrid.html">BiAbstractGrid</a></code> </code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"></td><td>The grid that the column is used in.</td></tr><tr><td><a name="header"></a><code>header</code></td><td><code class="type"> <code><a href="BiGridHeader.html">BiGridHeader</a></code> </code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"></td><td>This is the header represenging the column in the grid.</td></tr><tr><td><a name="iconColumn"></a><code>iconColumn</code></td><td><code class="type">Number</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"><img src="check.png" alt="checked"></td><td>Whether the current column is the icon column in the grid.</td></tr><tr><td><a name="indentColumn"></a><code>indentColumn</code></td><td><code class="type">Number</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"><img src="check.png" alt="checked"></td><td>Whether the current column is the indent column in the grid. This is ignored when using the columns for a non tree.</td></tr><tr><td><a name="name"></a><code>name</code></td><td><code class="type">String</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"><img src="check.png" alt="checked"></td><td>The name of the column. This is the same as the text shown on the header.</td></tr><tr><td><a name="orderIndex"></a><code>orderIndex</code></td><td><code class="type">Number</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"></td><td>The index of the column as it is currently being displayed. This means that the left most column has an order index of 0. This is not necessarily the same as the <code><a href="#columnIndex">columnIndex</a></code> when the columns have been reordered.</td></tr><tr><td><a name="sortFunction"></a><code>sortFunction</code></td><td><code class="type">Function</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"></td><td>This returns the function used to compare two <code><a href="BiAbstractGridRow.html">grid rows</a></code>. This means that this should return a function that takes two arguments and returns a number (just like the normal comparison function used when sorting arrays in JavaScript).</td></tr><tr><td><a name="sortType"></a><code>sortType</code></td><td><code class="type">String</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"><img src="check.png" alt="checked"></td><td>The type of the data in the column. This is used to decide how to sort the data in the column. Built in support for the following types:<br> <br> <code>string</code> <br> <code>caseInsensitiveString</code> <br> <code>number</code> <br> <code>date</code> - Uses the native JS Date type<br> <br> To get better control over the sorting create a subclass that overrides the <code><a href="#sortFunction">sortFunction</a></code> getter.</td></tr><tr><td><a name="tree"></a><code>tree</code></td><td><code class="type"> <code><a href="BiAbstractGrid.html">BiAbstractGrid</a></code> </code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"></td><td>The grid that the column is used in. (Same as <code><a href="#grid">grid</a></code>.)</td></tr><tr><td><a name="visible"></a><code>visible</code></td><td><code class="type">Boolean</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"><img src="check.png" alt="checked"></td><td>Whether the column is visible or not.</td></tr><tr><td><a name="width"></a><code>width</code></td><td><code class="type">Number</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"><img src="check.png" alt="checked"></td><td>The width of the column.</td></tr></tbody></table><h2>Methods</h2><p>None.</p><h2>Events</h2><p>None.</p><h2>Static Methods</h2><table><thead><tr><td>Name</td><td>Description</td></tr></thead><tbody><tr><td><code><a href="#caseInsensitiveStringCompare">caseInsensitiveStringCompare</a></code></td><td>A function taking two strings and returns a number used to compare them (less than zero if first is smaller, zero if equal and otherwise larger than zero). This comparison is case insensitive.</td></tr><tr><td><code><a href="#dateCompare">dateCompare</a></code></td><td>A function taking two Date objects and returns a number used to compare them (less than zero if first is smaller, zero if equal and otherwise larger than zero).</td></tr><tr><td><code><a href="#lessThanCompare">lessThanCompare</a></code></td><td>A function taking two objects and uses the built in less than operator to compare them and returns a number (less than zero if first is smaller, zero if equal and otherwise larger than zero).</td></tr><tr><td><code><a href="#numberCompare">numberCompare</a></code></td><td>A function taking two number arguments and returns a number used to compare them (less than zero if first is smaller, zero if equal and otherwise larger than zero).</td></tr><tr><td><code><a href="#stringCompare">stringCompare</a></code></td><td>A function taking two strings and returns a number used to compare them (less than zero if first is smaller, zero if equal and otherwise larger than zero).</td></tr></tbody></table><h2>Static Fields</h2><p>None.</p><h2>Remarks</h2><p> </p><h2>Static Method Details</h2><h3><a name="caseInsensitiveStringCompare"></a>caseInsensitiveStringCompare</h3><p>A function taking two strings and returns a number used to compare them (less than zero if first is smaller, zero if equal and otherwise larger than zero). This comparison is case insensitive.</p><h4>Syntax</h4><pre class="method-syntax">BiGridColumn.caseInsensitiveStringCompare(<span class="methodArgument">s1</span>, <span class="methodArgument">s2</span>)</pre><h4>Parameters</h4><table><thead><tr><td>Name</td><td>Type</td><td class="optional-header">Optional</td><td>Default</td><td>Descripton</td></tr></thead><tbody><tr><td><code>s1</code></td><td><code class="type">String</code></td><td class="optional-column"></td><td></td><td>The first string</td></tr><tr><td><code>s2</code></td><td><code class="type">String</code></td><td class="optional-column"></td><td></td><td>The second string</td></tr></tbody></table><h4>Return Type</h4><p><code class="type">Boolean</code></p><h3><a name="dateCompare"></a>dateCompare</h3><p>A function taking two Date objects and returns a number used to compare them (less than zero if first is smaller, zero if equal and otherwise larger than zero).</p><h4>Syntax</h4><pre class="method-syntax">BiGridColumn.dateCompare(<span class="methodArgument">d1</span>, <span class="methodArgument">d2</span>)</pre><h4>Parameters</h4><table><thead><tr><td>Name</td><td>Type</td><td class="optional-header">Optional</td><td>Default</td><td>Descripton</td></tr></thead><tbody><tr><td><code>d1</code></td><td><code class="type">Number</code></td><td class="optional-column"></td><td></td><td>The first number</td></tr><tr><td><code>d2</code></td><td><code class="type">Number</code></td><td class="optional-column"></td><td></td><td>The second number</td></tr></tbody></table><h4>Return Type</h4><p><code class="type">Boolean</code></p><h3><a name="lessThanCompare"></a>lessThanCompare</h3><p>A function taking two objects and uses the built in less than operator to compare them and returns a number (less than zero if first is smaller, zero if equal and otherwise larger than zero).</p><h4>Syntax</h4><pre class="method-syntax">BiGridColumn.lessThanCompare(<span class="methodArgument">v1</span>, <span class="methodArgument">v2</span>)</pre><h4>Parameters</h4><table><thead><tr><td>Name</td><td>Type</td><td class="optional-header">Optional</td><td>Default</td><td>Descripton</td></tr></thead><tbody><tr><td><code>v1</code></td><td><code class="type">Object</code></td><td class="optional-column"></td><td></td><td>The first value</td></tr><tr><td><code>v2</code></td><td><code class="type">Object</code></td><td class="optional-column"></td><td></td><td>The second value</td></tr></tbody></table><h4>Return Type</h4><p><code class="type">Boolean</code></p><h3><a name="numberCompare"></a>numberCompare</h3><p>A function taking two number arguments and returns a number used to compare them (less than zero if first is smaller, zero if equal and otherwise larger than zero).</p><h4>Syntax</h4><pre class="method-syntax">BiGridColumn.numberCompare(<span class="methodArgument">n1</span>, <span class="methodArgument">n2</span>)</pre><h4>Parameters</h4><table><thead><tr><td>Name</td><td>Type</td><td class="optional-header">Optional</td><td>Default</td><td>Descripton</td></tr></thead><tbody><tr><td><code>n1</code></td><td><code class="type">Number</code></td><td class="optional-column"></td><td></td><td>The first number</td></tr><tr><td><code>n2</code></td><td><code class="type">Number</code></td><td class="optional-column"></td><td></td><td>The second number</td></tr></tbody></table><h4>Return Type</h4><p><code class="type">Boolean</code></p><h3><a name="stringCompare"></a>stringCompare</h3><p>A function taking two strings and returns a number used to compare them (less than zero if first is smaller, zero if equal and otherwise larger than zero).</p><h4>Syntax</h4><pre class="method-syntax">BiGridColumn.stringCompare(<span class="methodArgument">s1</span>, <span class="methodArgument">s2</span>)</pre><h4>Parameters</h4><table><thead><tr><td>Name</td><td>Type</td><td class="optional-header">Optional</td><td>Default</td><td>Descripton</td></tr></thead><tbody><tr><td><code>s1</code></td><td><code class="type">String</code></td><td class="optional-column"></td><td></td><td>The first string</td></tr><tr><td><code>s2</code></td><td><code class="type">String</code></td><td class="optional-column"></td><td></td><td>The second string</td></tr></tbody></table><h4>Return Type</h4><p><code class="type">Boolean</code></p></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?