API / geotoolkit / widgets / data / DataTableAdapter / DataTableAdapter
data.DataTableAdapter.DataTableAdapter
DataTableAdapter allows use of DataTables with the tableView Widget.
↳
DataTableAdapter
Constructors
Methods
Constructors
• new DataTableAdapter(options)
| Name | Type | Description |
|---|---|---|
options | Options | DataTableAdapter Options |
DataProvider.constructor
Methods
▸ filter(column, filterValue): DataTableAdapter
Filtering in TableViewWidget by value specified by filter. By default, this method will return all column - cellvalues containing value to filter. External function for filtering can also be provided.
Example
// Filtering term can be string or function.
// For using function, which filters value containing 'a'.
const filteringFunction = function (index , value){
return value.toString().indexOf('a') !== -1;
}| Name | Type | Description |
|---|---|---|
column | number | column-number to filter column-specific data |
filterValue | string | Function | filtering term |
this
▸ getColumnsCount(): number
Gives number of columns
number
number of column
▸ getContentData(column, row): any
Returns the cell values of Table View Widget
| Name | Type | Description |
|---|---|---|
column | number | column-number |
row | number | row-number |
any
cell-value
▸ getContentFormat(column, row, cellStyle): CellStyle
Return custom cell style for table content
| Name | Type | Description |
|---|---|---|
column | number | Column index |
row | number | Row index |
cellStyle | CellStyle | Current cell style |
Cell style
▸ getData(): Data
▸ getDataTable(): DataTable
Gets a data table associated with this adapter
▸ getHeaderData(column): string
Returns header data of Table View Widget
| Name | Type | Description |
|---|---|---|
column | number | column-number |
string
column header
▸ getHeaderFormat(column, headerStyle): CellStyle
Returns Header style
| Name | Type | Description |
|---|---|---|
column | number | column number |
headerStyle | CellStyle | headerstyle |
Header style
▸ getIndexData(row): string
Return optionally formatted index value at row
| Name | Type | Description |
|---|---|---|
row | number | index value at row |
string
formatted index value
▸ getIndexFormat(row, cellStyle): CellStyle
Return custom cell style for index column
| Name | Type | Description |
|---|---|---|
row | number | Row index |
cellStyle | CellStyle | Current cell style |
Cell style
▸ getMarkerData(row): boolean
Show marker at row
| Name | Type | Description |
|---|---|---|
row | number | index value at row |
boolean
true to show marker, false otherwise
▸ getRowsCount(): number
Gives number of rows
number
Number of Rows
▸ getSortedByColumn(): Object
Gets sorted column number.
Object
| Name | Type |
|---|---|
column | number |
reverse | boolean |
▸ prepareContent(fromRow, toRow): void
Setting Content prepare
| Name | Type | Description |
|---|---|---|
fromRow | number | Row-number |
toRow | number | Row-number |
void
▸ prepareIndex(fromRow, toRow): void
Prepare Index Run before rendering table
| Name | Type | Description |
|---|---|---|
fromRow | number | fromrow |
toRow | number | toRow |
void
▸ sortByColumn(column, comparator): void
Sorting by column in TableViewWidget using specified comparator function.
| Name | Type | Description |
|---|---|---|
column | number | column number |
comparator | ComparatorCallback<any> | comparator function |
void