?? bigrid.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>BiGrid</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="BiGrid">BiGrid</h1>
<p>
This component is used to display a grid (table, column list). A grid
can show headers for both the columns and the rows. A grid also supports
selection of whole rows as well as of individual cells.
</p>
<p>This class extends
<code><a href="BiAbstractGrid.html">BiAbstractGrid</a></code>
and therefore all methods and fields available for
<code><a href="BiAbstractGrid.html">BiAbstractGrid</a></code>
are also available for <code>BiGrid</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><a href="BiAbstractGrid.html">BiAbstractGrid</a></code><ul><li><code>BiGrid</code><ul id="api-derived-classes"><li><code><a href="BiGridChart.html">BiGridChart</a></code></li></ul></li></ul></li></ul></li></ul></li></ul>
</li>
</ul>
<h2>Constructor</h2>
<p><code>
new BiGrid([<span class="methodArgument">oGridData</span> [, <span class="methodArgument">oColumnNames</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>oGridData</code></td>
<td><code class="type">Array</code></td>
<td class="optional-column"><img src="check.png" alt="checked"></td>
<td></td>
<td>
The initial data. This should be a 2-dimensional array (an array
of arrays) containing the data. The items in the array are passed
to the <code><a href="BiGridRow.html">grid row</a></code> and then to the
<code><a href="BiGridCell.html">grid cell</a></code>.
</td>
</tr>
<tr>
<td><code>oColumnNames</code></td>
<td><code class="type">Array</code></td>
<td class="optional-column"><img src="check.png" alt="checked"></td>
<td></td>
<td>
An array containt the names of the columns in the grid.
</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="currentDataPage"></a><code>currentDataPage</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 index of the current data page.
</td>
</tr>
<tr>
<td><a name="dataPageCount"></a><code>dataPageCount</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 number of data pages that are available. This is the numbers
of rows in the data set divided by the number of rows per page.
</td>
</tr>
<tr>
<td><a name="dataPageSize"></a><code>dataPageSize</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 amount of rows to show at one time from the data source.
</td>
</tr>
<tr>
<td><a name="dataSource"></a><code>dataSource</code></td>
<td><code class="type">
<code><a href="BiDataTable.html">BiDataTable</a></code> / <code><a href="BiDataSet.html">BiDataSet</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>
The object to use as the data source. This can be a either a
<code><a href="BiDataTable.html">BiDataTable</a></code> or a
<code><a href="BiDataSet.html">BiDataSet</a></code> (in which case the
first table is used).
</td>
</tr>
<tr>
<td><a name="firstRow"></a><code>firstRow</code></td>
<td><code class="type"><code><a href="BiGridRow.html">BiGridRow</a></code></code></td>
<td class="get-column"><img src="check.png" alt="checked"></td>
<td class="set-column"></td>
<td>
Returns the first row.
</td>
</tr>
<tr>
<td><a name="headerCorner"></a><code>headerCorner</code></td>
<td><code class="type"><code><a href="BiGridHeaderCorner.html">BiGridHeaderCorner</a></code></code></td>
<td class="get-column"><img src="check.png" alt="checked"></td>
<td class="set-column"></td>
<td>
This is the component that is shown in the upper left corner of
the grid when both headers and row headers are shown.
</td>
</tr>
<tr>
<td><a name="lastRow"></a><code>lastRow</code></td>
<td><code class="type"><code><a href="BiGridRow.html">BiGridRow</a></code></code></td>
<td class="get-column"><img src="check.png" alt="checked"></td>
<td class="set-column"></td>
<td>
Returns the last row.
</td>
</tr>
<tr>
<td><a name="rowHeaders"></a><code>rowHeaders</code></td>
<td><code class="type"><code><a href="BiGridRowHeaders.html">BiGridRowHeaders</a></code></code></td>
<td class="get-column"><img src="check.png" alt="checked"></td>
<td class="set-column"></td>
<td>
The component responsible for drawing the grid row headers
</td>
</tr>
<tr>
<td><a name="rowHeadersHtml"></a><code>rowHeadersHtml</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>Returns the HTML needed for the row headers</td>
</tr>
<tr>
<td><a name="rows"></a><code>rows</code></td>
<td><code class="type"><code><a href="BiGridRow.html">BiGridRow[]</a></code></code></td>
<td class="get-column"><img src="check.png" alt="checked"></td>
<td class="set-column"></td>
<td>
Returns all the rows.
</td>
</tr>
<tr>
<td><a name="selectionMode"></a><code>selectionMode</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>
Sets the selection mode. Allowed values are "cell" and "row".
</td>
</tr>
</tbody>
</table>
<h2>Methods</h2>
<table>
<thead>
<tr>
<td>Name</td>
<td>Description</td>
</tr>
</thead>
<tbody>
<tr>
<td><code><a href="#addRow">addRow</a></code></td>
<td>Adds a grid row to the grid</td>
</tr>
<tr>
<td><code><a href="#createItemFromDataRow">createItemFromDataRow</a></code></td>
<td>
This method is called when using data binding. This is used to
create a new <code><a href="BiGridRow.html">BiGridRow</a></code> from a
<code><a href="BiDataRow.html">BiDataRow</a></code>.
</td>
</tr>
<tr>
<td><code><a href="#dataBind">dataBind</a></code></td>
<td>
If the grid has a <code><a href="#dataSource">dataSource</a></code> then this binds that
data source to the list.
</td>
</tr>
<tr>
<td><code><a href="#hasRows">hasRows</a></code></td>
<td>Returns true if the grid has any rows</td>
</tr>
<tr>
<td><code><a href="#removeAll">removeAll</a></code></td>
<td>Removes all rows (and disposes them)</td>
</tr>
<tr>
<td><code><a href="#removeRow">removeRow</a></code></td>
<td>Removes a grid row. Returns the removed row.</td>
</tr>
<tr>
<td><code><a href="#updateRowHeadersHeight">updateRowHeadersHeight</a></code></td>
<td>Updates the height of the row headers</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="databind"></a><code>databind</code></td>
<td><code class="type"><code><a href="BiEvent.html">BiEvent</a></code></code></td>
<td class="bubbles-column"></td>
<td>Called after the component has been data bound</td>
</tr>
</tbody>
</table>
<h2>Static Methods</h2>
<p>None.</p>
<h2>Static Fields</h2>
<table>
<thead>
<tr>
<td>Name</td>
<td>Type</td>
<td>Descripton</td>
</tr>
</thead>
<tbody>
<tr>
<td><code>DEFAULT_ICON</code></td>
<td><code class="type">String</code></td>
<td>The image file to as a default icon for the grid rows</td>
</tr>
</tbody>
</table>
<h2>Remarks</h2>
<p>
After changing the data call <code><a href="BiAbstractGrid.html#updateData">updateData</a></code>
to redraw the body of the grid. When the columns have been changed you
should call <code><a href="BiAbstractGrid.html#updateColumns">updateColumns</a></code>.
</p>
<h2>Method Details</h2>
<h3><a name="addRow"></a>addRow</h3>
<p>Adds a grid row to the grid</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.addRow(<span class="methodArgument">oChild</span> [, <span class="methodArgument">oBefore</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>oChild</code></td>
<td><code class="type"><code><a href="BiGridRow.html">BiGridRow</a></code></code></td>
<td class="optional-column"></td>
<td></td>
<td>The grid row child to add</td>
</tr>
<tr>
<td><code>oBefore</code></td>
<td><code class="type"><code><a href="BiGridRow.html">BiGridRow</a></code></code></td>
<td class="optional-column"><img src="check.png" alt="checked"></td>
<td></td>
<td>If provided, the child is added before this row</td>
</tr>
</tbody>
</table>
<h4>Return Type</h4>
<p><code class="type">void</code></p>
<h3><a name="createItemFromDataRow"></a>createItemFromDataRow</h3>
<p>
This method is called when using data binding. This is used to
create a new <code><a href="BiGridRow.html">BiGridRow</a></code> from a
<code><a href="BiDataRow.html">BiDataRow</a></code>.
</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.createItemFromDataRow(<span class="methodArgument">oRow</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>oRow</code></td>
<td><code class="type"><code><a href="BiDataRow.html">BiDataRow</a></code></code></td>
<td class="optional-column"></td>
<td></td>
<td>
This is the row to create a new <code><a href="BiGridRow.html">BiGridRow</a></code> from.
</td>
</tr>
</tbody>
</table>
<h4>Return Type</h4>
<p><code class="type"><code><a href="BiGridRow.html">BiGridRow</a></code></code></p>
<h3><a name="dataBind"></a>dataBind</h3>
<p>
If the grid has a <code><a href="#dataSource">dataSource</a></code> then this binds that
data source to the list.
</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.dataBind()</pre>
<h4>Parameters</h4>
<p>No arguments.</p>
<h4>Return Type</h4>
<p><code class="type">void</code></p>
<h3><a name="hasRows"></a>hasRows</h3>
<p>Returns true if the grid has any rows</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.hasRows()</pre>
<h4>Parameters</h4>
<p>No arguments.</p>
<h4>Return Type</h4>
<p><code class="type">Boolean</code></p>
<h3><a name="removeAll"></a>removeAll</h3>
<p>Removes all rows (and disposes them)</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.removeAll()</pre>
<h4>Parameters</h4>
<p>No arguments.</p>
<h4>Return Type</h4>
<p><code class="type">void</code></p>
<h3><a name="removeRow"></a>removeRow</h3>
<p>Removes a grid row. Returns the removed row.</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.removeRow(<span class="methodArgument">oChild</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>oChild</code></td>
<td><code class="type"><code><a href="BiGridRow.html">BiGridRow</a></code></code></td>
<td class="optional-column"></td>
<td></td>
<td>The row to remove</td>
</tr>
</tbody>
</table>
<h4>Return Type</h4>
<p><code class="type"><code><a href="BiGridRow.html">BiGridRow</a></code></code></p>
<h3><a name="updateRowHeadersHeight"></a>updateRowHeadersHeight</h3>
<p>Updates the height of the row headers</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.updateRowHeadersHeight()</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 + -