📄 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">Object[][]</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">String[]</code></td><td class="optional-column"></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="BiDataSet.html">BiDataSet</a></code> /<code><a href="BiDataTable.html">BiDataTable</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="#getCellAtPoint">getCellAtPoint</a></code></td><td>Returns the grid cell at the given point. If no cell is found this returns null.</td></tr><tr><td><code><a href="#getRowAtPoint">getRowAtPoint</a></code></td><td>Returns the grid row at the given point. If no row is found this returns null.</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 and disposes all rows from the grid</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="#removeRowAt">removeRowAt</a></code></td><td>Removes the grid row at the given index. 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="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="databind"></a><code>databind</code></td><td><code class="type"> <code><a href="BiEvent.html">BiEvent</a></code> </code></td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -