Example
let sHtml = "<select>";
const iRowCount = oDataStore.rowCount;
for ( let iRow = 0; iRow < iRowCount; iRow++ )
{
sHtml += `<option>${oDataStore.getCellValue( iRow, 0 )}</option>`;
}
sHtml += "</select>";
oControlHost.container.innerHTML = sHtml;
Members
(readonly) columnCount :Integer
The number of columns in the data store.
- Integer
(readonly) columnFormattedValues :Array.<Array.<String>>
The column formatted values. If a column is not categorical data, or does not have formatted values, the column entry will be null.
- Array.<Array.<String>>
- Since
(readonly) columnNames :Array.<String>
The column names.
- Array.<String>
(readonly) columnValues :Array.<Array.<String>>
The column values. If your data contains duplicate values such as London (England) and London (Ontario), this array, in conjunction with valueIndex
can be used to distinguish between multiple identical strings. If a column is not categorical data, the column entry will be null.
- Array.<Array.<String>>
- Since
(readonly) dataTypes :Array.<DataStoreDataType>
The column data types.
- Array.<DataStoreDataType>
(readonly) index :Integer
The data store index (zero based). The order will match the order of the authored data sets.
- Integer
(readonly) name :String
The data store name.
- String
(readonly) rowCount :Integer
The number of rows in the data store.
- Integer
Methods
getCell(iRowIndex, iColumnIndex) → {DataStoreCell}
Get a cell.
Name | Type | Description |
---|---|---|
iRowIndex | Integer | The row index (zero based). |
iColumnIndex | Integer | The column index (zero based). |
- Since
The cell at the given row and column index.
- Type:
- DataStoreCell
getCellValue(iRowIndex, iColumnIndex) → {Number|String}
Get a cell value.
Name | Type | Description |
---|---|---|
iRowIndex | Integer | The row index (zero based). |
iColumnIndex | Integer | The column index (zero based). |
The value at the given row and column index.
- Type:
- Number |
String
getColumnIndex(sColumnName) → {Integer}
Get the column index by name.
Name | Type | Description |
---|---|---|
sColumnName | String | The column name. |
The zero based index of the column or NaN if the column doesn't exist.
- Type:
- Integer
getFormattedCellValue(iRowIndex, iColumnIndex) → {String}
Get a formatted cell value.
Name | Type | Description |
---|---|---|
iRowIndex | Integer | The row index (zero based). |
iColumnIndex | Integer | The column index (zero based). |
The formatted value at the given row and column index. If there's no formatted value, the value (unformatted) is returned.
- Type:
- String
sort(iColumnIndex, bAscending) → {DataStore}
Create a new data store sorted on a column.
Name | Type | Description |
---|---|---|
iColumnIndex | Integer | The column index (zero based). |
bAscending | Boolean | Whether to sort the column ascending (true) or descending (false). |
- Since
The new data store.
- Type:
- DataStore