?? biabstractgrid.html
字號:
<!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 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="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="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>
Returns the top level grid control
</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 the rows 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="BiGridSelectionModel.html">BiGridSelectionModel</a></code>/<code><a href="BiTreeSelectionModel.html">BiTreeSelectionModel</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>
<tr>
<td><a name="styleText"></a><code>styleText</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>
This returns the style (CSS) used to layout the grid. Override this
to add specific styles to certain columns.
</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>
Returns the top level tree control used for tree control.
This will always return the tree for a tree control but it is
provided so that the tree has the same interface as the
<code><a href="BiTreeNode.html">tree noeds</a></code>. This is same as
the <code><a href="#grid">grid</a></code> property.
</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>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -