⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 biabstractgrid.html

📁 在流览器上仿CS界面的JAVASCRIPT脚本
💻 HTML
📖 第 1 页 / 共 2 页
字号:
</tr>
<tr>
<td><code><a href="#updateData">updateData</a></code></td>
<td>
				Redraws the data by regenerating the <code><a href="#gridBodyHtml">gridBodyHtml</a></code>.
				This should be called before the first draw of the grid and it
				should be called when changes to the data has occured. It should
				also be called when the icon column or the indent column is
				changed.
			</td>
</tr>
<tr>
<td><code><a href="#updateHeadersWidth">updateHeadersWidth</a></code></td>
<td>
				Updates the width of the grid headers. This can be called if
				the size of the headers becomes dirty.
			</td>
</tr>
</tbody>
</table>
<h2>Events</h2>
<table>
<thead>
<tr>
<td>Name</td>
<td>Type</td>
<td class="bubbles-header">Bubbles</td>
<td>Descripton</td>
</tr>
</thead>
<tbody>
<tr>
<td><a name="beforesort"></a><code>beforesort</code></td>
<td><code class="type"><code><a href="BiEvent.html">BiEvent</a></code></code></td>
<td class="bubbles-column"></td>
<td>
				Fires before the sort happens. Call
				<code><a href="BiEvent.html#preventDefault">preventDefalt</a></code>
				to prevent the sorting.
			</td>
</tr>
<tr>
<td><a name="change"></a><code>change</code></td>
<td><code class="type"><code><a href="BiEvent.html">BiEvent</a></code></code></td>
<td class="bubbles-column"></td>
<td>Fires when the selected row/cell changes</td>
</tr>
<tr>
<td><a name="sort"></a><code>sort</code></td>
<td><code class="type"><code><a href="BiEvent.html">BiEvent</a></code></code></td>
<td class="bubbles-column"></td>
<td>
				Fired after the grid has been sorted.
			</td>
</tr>
</tbody>
</table>
<h2>Static Methods</h2>
<p>None.</p>
<h2>Static Fields</h2>
<p>None.</p>
<h2>Remarks</h2>
<p>None.</p>
<h2>Method Details</h2>
<h3><a name="findString"></a>findString</h3>
<p>
				Searches the <code><a href="BiAbstractRow.html">rows</a></code>
				for a row that starts with the given string. This match is case
				insensitive. If no item is found this returns <code>null</code>.
				For a <code><a href="BiTree.html">tree</a></code> this does not include hidden
				children of collapsed nodes.
			</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.findString(<span class="methodArgument">sText</span> [, <span class="methodArgument">nStartIndex</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>sText</code></td>
<td><code class="type">String</code></td>
<td class="optional-column"></td>
<td></td>
<td>The text to search for</td>
</tr>
<tr>
<td><code>nStartIndex</code></td>
<td><code class="type">Number</code></td>
<td class="optional-column"><img src="check.png" alt="checked"></td>
<td><code>0</code></td>
<td>The index to start the searching from</td>
</tr>
</tbody>
</table>
<h4>Return Type</h4>
<p><code class="type"><code><a href="BiAbstractRow.html">BiAbstractRow</a></code></code></p>
<h3><a name="findStringExact"></a>findStringExact</h3>
<p>
				Searches the <code><a href="BiAbstractRow.html">rows</a></code>
				for a row that matches the given string. This match is case
				insensitive. If no item is found this returns <code>null</code>.
				For a <code><a href="BiTree.html">tree</a></code> this does not include hidden
				children of collapsed nodes.
			</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.findStringExact(<span class="methodArgument">sText</span> [, <span class="methodArgument">nStartIndex</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>sText</code></td>
<td><code class="type">String</code></td>
<td class="optional-column"></td>
<td></td>
<td>The text to search for</td>
</tr>
<tr>
<td><code>nStartIndex</code></td>
<td><code class="type">Number</code></td>
<td class="optional-column"><img src="check.png" alt="checked"></td>
<td><code>0</code></td>
<td>The index to start the searching from</td>
</tr>
</tbody>
</table>
<h4>Return Type</h4>
<p><code class="type"><code><a href="BiAbstractRow.html">BiAbstractRow</a></code></code></p>
<h3><a name="getColumnAlign"></a>getColumnAlign</h3>
<p>
				Returns the text align for the column.
			</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.getColumnAlign(<span class="methodArgument">nColumn</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>nColumn</code></td>
<td><code class="type">Number</code></td>
<td class="optional-column"></td>
<td></td>
<td>The column to get the text align for</td>
</tr>
</tbody>
</table>
<h4>Return Type</h4>
<p><code class="type">String</code></p>
<h3><a name="getColumnName"></a>getColumnName</h3>
<p>
				Returns the name of the column
			</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.getColumnName(<span class="methodArgument">nColumn</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>nColumn</code></td>
<td><code class="type">Number</code></td>
<td class="optional-column"></td>
<td></td>
<td>The column to get the name for</td>
</tr>
</tbody>
</table>
<h4>Return Type</h4>
<p><code class="type">String</code></p>
<h3><a name="getColumnOrder"></a>getColumnOrder</h3>
<p>
				Returns the column order index for the column. If <code><a href="#columnOrders">columnOrders</a></code>
				is <code>[2, 0, 1]</code> then <code>getColumnOrder(1)</code> will
				return <code>2</code>.
			</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.getColumnOrder(<span class="methodArgument">nColumn</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>nColumn</code></td>
<td><code class="type">Number</code></td>
<td class="optional-column"></td>
<td></td>
<td>The column to get the order index for</td>
</tr>
</tbody>
</table>
<h4>Return Type</h4>
<p><code class="type">Number</code></p>
<h3><a name="getColumnSortType"></a>getColumnSortType</h3>
<p>
				Returns the sort type of the column
			</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.getColumnSortType(<span class="methodArgument">nColumn</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>nColumn</code></td>
<td><code class="type">Number</code></td>
<td class="optional-column"></td>
<td></td>
<td>The column to get the sort type for</td>
</tr>
</tbody>
</table>
<h4>Return Type</h4>
<p><code class="type">String</code></p>
<h3><a name="getColumnWidth"></a>getColumnWidth</h3>
<p>Returns the column width for the column</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.getColumnWidth(<span class="methodArgument">nColumn</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>nColumn</code></td>
<td><code class="type">Number</code></td>
<td class="optional-column"></td>
<td></td>
<td>The column to get the width for</td>
</tr>
</tbody>
</table>
<h4>Return Type</h4>
<p><code class="type">Number</code></p>
<h3><a name="sort"></a>sort</h3>
<p>
				Sorts the grid by the given column
			</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.sort(<span class="methodArgument">nCol</span> [, <span class="methodArgument">bAscending</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>nCol</code></td>
<td><code class="type">Number</code></td>
<td class="optional-column"></td>
<td></td>
<td>The column to sort by</td>
</tr>
<tr>
<td><code>bAscending</code></td>
<td><code class="type">Boolean</code></td>
<td class="optional-column"><img src="check.png" alt="checked"></td>
<td><code>false</code></td>
<td>Sorting ascending or descending</td>
</tr>
</tbody>
</table>
<h4>Return Type</h4>
<p><code class="type">void</code></p>
<h3><a name="update"></a>update</h3>
<p>
				Updates both the columns and the data.
			</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.update()</pre>
<h4>Parameters</h4>
<p>No arguments.</p>
<h4>Return Type</h4>
<p><code class="type">void</code></p>
<h3><a name="updateColumns"></a>updateColumns</h3>
<p>
				Updates the column widths by regenerating the <code><a href="#styleText">styleText</a></code>.
				This should be called before the first draw of the grid and it
				should be called if the columns widths, column align or the indent
				column is changed.
			</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.updateColumns()</pre>
<h4>Parameters</h4>
<p>No arguments.</p>
<h4>Return Type</h4>
<p><code class="type">void</code></p>
<h3><a name="updateData"></a>updateData</h3>
<p>
				Redraws the data by regenerating the <code><a href="#gridBodyHtml">gridBodyHtml</a></code>.
				This should be called before the first draw of the grid and it
				should be called when changes to the data has occured. It should
				also be called when the icon column or the indent column is
				changed.
			</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.updateData()</pre>
<h4>Parameters</h4>
<p>No arguments.</p>
<h4>Return Type</h4>
<p><code class="type">void</code></p>
<h3><a name="updateHeadersWidth"></a>updateHeadersWidth</h3>
<p>
				Updates the width of the grid headers. This can be called if
				the size of the headers becomes dirty.
			</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.updateHeadersWidth()</pre>
<h4>Parameters</h4>
<p>No arguments.</p>
<h4>Return Type</h4>
<p><code class="type">void</code></p>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -