biabstractgrid.html

来自「ajax 框价.是个好工具.javascript 矿家.可以用在任何平台.」· HTML 代码 · 共 675 行 · 第 1/2 页

HTML
675
字号
<!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>BiAbstractGrid</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="BiAbstractGrid">BiAbstractGrid</h1><p>The abstract base class for the <code><a href="BiGrid.html">grid</a></code> and the <code><a href="BiTree.html">tree</a></code>.</p><p>This class extends		<code><a href="BiComponent.html">BiComponent</a></code>		and therefore all methods and fields available for		<code><a href="BiComponent.html">BiComponent</a></code>		are also available for <code>BiAbstractGrid</code>.</p><ul class="partial-class-tree"><li><code><a href="BiObject.html">BiObject</a></code><ul><li><code><a href="BiEventTarget.html">BiEventTarget</a></code><ul><li><code><a href="BiComponent.html">BiComponent</a></code><ul><li><code>BiAbstractGrid</code><ul id="api-derived-classes"><li><code><a href="BiGrid.html">BiGrid</a></code></li><li><code><a href="BiTree.html">BiTree</a></code></li></ul></li></ul></li></ul></li></ul></li></ul><h2>Constructor</h2><p><code>	new BiAbstractGrid()</code></p><h3>Parameters</h3><p>No parameters.</p><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="allowInlineFind"></a><code>allowInlineFind</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>When <code>true</code>, typing a word will select the first matching item.</td></tr><tr><td><a name="ascending"></a><code>ascending</code></td><td><code class="type">Boolean</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"></td><td>Whether to sort the grid ascendingly or descendingly. Use the <code><a href="#sort">sort</a></code> method to change the ascending property.</td></tr><tr><td><a name="columnAligns"></a><code>columnAligns</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>An array containing the text aligns for the columns</td></tr><tr><td><a name="columnCount"></a><code>columnCount</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 number of columns to show in the grid</td></tr><tr><td><a name="columnNames"></a><code>columnNames</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>An array containing the names for the columns. The names is used for the text on the column header.</td></tr><tr><td><a name="columnOrders"></a><code>columnOrders</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>An array containing the orders of the columns. A value of <code>[2, 0, 1]</code> means that the third column should be displayed left most and the second column right most.</td></tr><tr><td><a name="columns"></a><code>columns</code></td><td><code class="type">				<code><a href="BiGridColumn.html">BiGridColumn[]</a></code>			</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"></td><td>An array containing the column objects used for the grid</td></tr><tr><td><a name="columnSortTypes"></a><code>columnSortTypes</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>An array containg the sort types for the columns. Valid values can be found in the documentation for the <code><a href="BiGridColumn.html#sortType">BiGridColumn sortType</a></code>.</td></tr><tr><td><a name="columnWidths"></a><code>columnWidths</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>An array containing the widths of the columns</td></tr><tr><td><a name="fitColumnWidths"></a><code>fitColumnWidths</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>When this is true the column will be sized so that the fill the grid viewport</td></tr><tr><td><a name="gridBodyHtml"></a><code>gridBodyHtml</code></td><td><code class="type">String</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"></td><td>Generates the HTML code used to display the grid body.</td></tr><tr><td><a name="headers"></a><code>headers</code></td><td><code class="type">				<code><a href="BiGridHeaders.html">BiGridHeaders</a></code>			</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"></td><td>The component containing the grid headers</td></tr><tr><td><a name="headersHeight"></a><code>headersHeight</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 height of the headers</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>The column to show the icon on. Setting this to -1 (or a value greater than the column count) removes the icons.</td></tr><tr><td><a name="liveResize"></a><code>liveResize</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>When this is set to true the column size in the grid body is updated as the user resizes the headers. If this is false the column size in the body is only updated as the user finishes the resize of the column header.</td></tr><tr><td><a name="multipleSelection"></a><code>multipleSelection</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 to allow multiple selection</td></tr><tr><td><a name="rowHeadersWidth"></a><code>rowHeadersWidth</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 row headers that can be shown when using a grid</td></tr><tr><td><a name="rowHeight"></a><code>rowHeight</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 height of each row in the grid</td></tr><tr><td><a name="selectedNode"></a><code>selectedNode</code></td><td><code class="type">				<code><a href="BiAbstractGridRow.html">BiAbstractGridRow</a></code> /<code><a href="BiGridCell.html">BiGridCell</a></code>			</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"></td><td>Returns the first selected grid row (or cell). This is same as <code>grid.getSelectedNodes()[0]</code>. Same as <code><a href="#selectedRow">selectedRow</a></code>.</td></tr><tr><td><a name="selectedNodes"></a><code>selectedNodes</code></td><td><code class="type">				<code><a href="BiAbstractGridRow.html">BiAbstractGridRow[]</a></code> /<code><a href="BiGridCell.html">BiGridCell[]</a></code>			</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"></td><td>Returns the selected grid rows or grid cells if cell selection is used. Same as <code><a href="#selectedRows">selectedRows</a></code>.</td></tr><tr><td><a name="selectedRow"></a><code>selectedRow</code></td><td><code class="type">				<code><a href="BiAbstractGridRow.html">BiAbstractGridRow</a></code> /<code><a href="BiGridCell.html">BiGridCell</a></code>			</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"></td><td>Returns the first selected grid row (or cell). This is same as <code>grid.getSelectedNodes()[0]</code>.</td></tr><tr><td><a name="selectedRows"></a><code>selectedRows</code></td><td><code class="type">				<code><a href="BiAbstractGridRow.html">BiAbstractGridRow[]</a></code> /<code><a href="BiGridCell.html">BiGridCell[]</a></code>			</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"></td><td>Returns the selected grid rows or grid cells if cell selection is used.</td></tr><tr><td><a name="selectionModel"></a><code>selectionModel</code></td><td><code class="type">				<code><a href="BiSelectionModel.html">BiSelectionModel</a></code>			</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>This handles the selection of the rows in the grid.</td></tr><tr><td><a name="showHeaders"></a><code>showHeaders</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 to show the headers on the grid</td></tr><tr><td><a name="showRowHeaders"></a><code>showRowHeaders</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 to show the row headers on the grid</td></tr><tr><td><a name="sortColumn"></a><code>sortColumn</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 column to sort the grid by. Use the <code><a href="#sort">sort</a></code> method to update the sort column.</td></tr></tbody></table><h2>Methods</h2><table><thead><tr><td>Name</td><td>Description</td></tr></thead><tbody><tr><td><code><a href="#findString">findString</a></code></td><td>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.</td></tr><tr><td><code><a href="#findStringExact">findStringExact</a></code></td><td>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.</td></tr><tr><td><code><a href="#getColumnAlign">getColumnAlign</a></code></td><td>Returns the text align for the column.</td></tr><tr><td><code><a href="#getColumnName">getColumnName</a></code></td><td>Returns the name of the column</td></tr><tr><td><code><a href="#getColumnOrder">getColumnOrder</a></code></td><td>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>.</td></tr><tr><td><code><a href="#getColumnSortType">getColumnSortType</a></code></td><td>Returns the sort type of the column</td></tr><tr><td><code><a href="#getColumnWidth">getColumnWidth</a></code></td><td>Returns the column width for the column</td></tr><tr><td><code><a href="#sort">sort</a></code></td><td>Sorts the grid by the given column</td></tr><tr><td><code><a href="#update">update</a></code></td><td>Updates both the columns and the data.</td></tr><tr><td><code><a href="#updateColumns">updateColumns</a></code></td><td>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.</td></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>

⌨️ 快捷键说明

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