ColumnScopeApi
Provides access to a suite of functions related to the Column Scope object
export interfaceMethods
| Method | Description |
|---|---|
| areAllBooleanColumnsInScope(scope) | True if all selected columns are boolean |
| createCellColorRangesForScope(scope) | Creates Cell Color Ranges (used in Format Column) for given Scope |
| getColumnIdsInScope(scope) | Returns all the ColumnIds in the Scope |
| getColumnsInScope(scope) | Returns list of all Columns in the given Scope |
| getColumnTypesInScope(scope) | Returns all the ColumnTypes in the Scope |
| getDataTypesInScope(scope) | Returns all the DataTypes in the Scope |
| getScopeDescription(scope) | Provides a description for the Scope |
| getScopeToString(scope) | Gets string representation of the Scope |
| getSingleColumnInScope(scope) | Gets the only Column in given Scope |
| isColumnInDateScope(column, scope) | True if Scope has Data DataType which contains Column |
| isColumnInNumericScope(column, scope) | True if Scope has Numeric DataType containing Column |
| isColumnInScope(column, scope) | True if Column is in given Scope |
| isColumnInScopeColumns(column, scope) | True if Column is in Scope's 'ColumnIds' section |
| isColumnInTextScope(column, scope) | True if Scope has text DataType containing Column |
| isPrimaryKeyColumnInScopeColumns(scope) | Whether PK column is included in Scope's column section |
| isScopeInScope(scopeA, scopeB) | True if first scope is in second Scope |
| isSingleBooleanColumnScope(scope) | True if Scope contains just 1 boolean Column |
| isSingleColumnScope(scope) | True if Scope contains just 1 ColumnId |
| isSingleNumericColumnScope(scope) | True if Scope contains just 1 numeric Column |
| scopeHasColumns(scope) | True if Scope contains ColumnIds |
| scopeHasColumnType(scope) | True if Scope contains ColumnTypes |
| scopeHasDataType(scope) | True if Scope contains DataTypes |
| scopeHasOnlyBooleanDataType(scope) | True if Scope is DataTypes and contains just 'Boolean' |
| scopeIsAll(scope) | True if Scope is 'All' |
| scopeIsEmpty(scope) | True if Scope is empty |
Method Details
areAllBooleanColumnsInScope
True if all selected columns are boolean
areAllBooleanColumnsInScope(scope: ColumnScope): boolean;Parameters
| Parameter | Type | Description |
|---|---|---|
| scope | ColumnScope | Scope to check |
Returns
boolean
createCellColorRangesForScope
Creates Cell Color Ranges (used in Format Column) for given Scope
createCellColorRangesForScope(scope: ColumnScope): CellColorRange[];Parameters
| Parameter | Type | Description |
|---|---|---|
| scope | ColumnScope | Scope to use |
Returns
getColumnIdsInScope
Returns all the ColumnIds in the Scope
getColumnIdsInScope(scope: ColumnScope): string[] | undefined;Parameters
| Parameter | Type | Description |
|---|---|---|
| scope | ColumnScope | Scope to check |
Returns
string[] | undefined
getColumnsInScope
Returns list of all Columns in the given Scope
getColumnsInScope(scope: ColumnScope): AdaptableColumn[];Parameters
| Parameter | Type | Description |
|---|---|---|
| scope | ColumnScope | the Scope to check |
Returns
getColumnTypesInScope
Returns all the ColumnTypes in the Scope
getColumnTypesInScope(scope: ColumnScope): string[] | undefined;Parameters
| Parameter | Type | Description |
|---|---|---|
| scope | ColumnScope | Scope to check |
Returns
string[] | undefined
getDataTypesInScope
Returns all the DataTypes in the Scope
getDataTypesInScope(scope: ColumnScope): ScopeDataType[] | undefined;Parameters
| Parameter | Type | Description |
|---|---|---|
| scope | ColumnScope | Scope to check |
Returns
ScopeDataType[] | undefined
getScopeDescription
Provides a description for the Scope
getScopeDescription(scope: ColumnScope): string;Parameters
| Parameter | Type | Description |
|---|---|---|
| scope | ColumnScope | The Scope to check |
Returns
string
getScopeToString
Gets string representation of the Scope
getScopeToString(scope: ColumnScope): string;Parameters
| Parameter | Type | Description |
|---|---|---|
| scope | ColumnScope | Scope to check |
Returns
string
getSingleColumnInScope
Gets the only Column in given Scope
getSingleColumnInScope(scope: ColumnScope): string | undefined;Parameters
| Parameter | Type | Description |
|---|---|---|
| scope | ColumnScope | Scope to check |
Returns
string | undefined
isColumnInDateScope
True if Scope has Data DataType which contains Column
isColumnInDateScope(column: AdaptableColumn, scope: ColumnScope): boolean;Parameters
| Parameter | Type | Description |
|---|---|---|
| column | AdaptableColumn | Column to check |
| scope | ColumnScope | Scope to check |
Returns
boolean
isColumnInNumericScope
True if Scope has Numeric DataType containing Column
isColumnInNumericScope(column: AdaptableColumn, scope: ColumnScope): boolean;Parameters
| Parameter | Type | Description |
|---|---|---|
| column | AdaptableColumn | Column to check |
| scope | ColumnScope | Scope to check |
Returns
boolean
isColumnInScope
True if Column is in given Scope
isColumnInScope(column: AdaptableColumn | undefined, scope: ColumnScope): boolean;Parameters
| Parameter | Type | Description |
|---|---|---|
| column | AdaptableColumn | undefined | Column to check |
| scope | ColumnScope | The Scope to check |
Returns
boolean
isColumnInScopeColumns
True if Column is in Scope's 'ColumnIds' section
isColumnInScopeColumns(column: AdaptableColumn, scope: ColumnScope): boolean;Parameters
| Parameter | Type | Description |
|---|---|---|
| column | AdaptableColumn | Column to check |
| scope | ColumnScope | Scope to check |
Returns
boolean
isColumnInTextScope
True if Scope has text DataType containing Column
isColumnInTextScope(column: AdaptableColumn, scope: ColumnScope): boolean;Parameters
| Parameter | Type | Description |
|---|---|---|
| column | AdaptableColumn | Column to check |
| scope | ColumnScope | Scope to check |
Returns
boolean
isPrimaryKeyColumnInScopeColumns
Whether PK column is included in Scope's column section
isPrimaryKeyColumnInScopeColumns(scope: ColumnScope): boolean;Parameters
| Parameter | Type | Description |
|---|---|---|
| scope | ColumnScope | Scope to check |
Returns
boolean
isScopeInScope
True if first scope is in second Scope
Scope A | Scope B | Result =========================================================================== All * true * All true DataTypes DataTypes all DataTypes from A should be in B ColumnIds ColumnIds all ColumnIds from A should be in B ColumnIds DataTypes all DataTypes of ColumnIds from A should be in B DataTypes ColumnIds false
isScopeInScope(scopeA: ColumnScope, scopeB: ColumnScope): boolean;Parameters
| Parameter | Type | Description |
|---|---|---|
| scopeA | ColumnScope | first Scope |
| scopeB | ColumnScope | second Scope |
Returns
boolean
isSingleBooleanColumnScope
True if Scope contains just 1 boolean Column
isSingleBooleanColumnScope(scope: ColumnScope): boolean;Parameters
| Parameter | Type | Description |
|---|---|---|
| scope | ColumnScope | Scope to check |
Returns
boolean
isSingleColumnScope
True if Scope contains just 1 ColumnId
isSingleColumnScope(scope: ColumnScope): boolean;Parameters
| Parameter | Type | Description |
|---|---|---|
| scope | ColumnScope | Scope to check |
Returns
boolean
isSingleNumericColumnScope
True if Scope contains just 1 numeric Column
isSingleNumericColumnScope(scope: ColumnScope): boolean;Parameters
| Parameter | Type | Description |
|---|---|---|
| scope | ColumnScope | Scope to check |
Returns
boolean
scopeHasColumns
True if Scope contains ColumnIds
scopeHasColumns(scope: ColumnScope): boolean;Parameters
| Parameter | Type | Description |
|---|---|---|
| scope | ColumnScope | Scope to check |
Returns
boolean
scopeHasColumnType
True if Scope contains ColumnTypes
scopeHasColumnType(scope: ColumnScope): boolean;Parameters
| Parameter | Type | Description |
|---|---|---|
| scope | ColumnScope | Scope to check |
Returns
boolean
scopeHasDataType
True if Scope contains DataTypes
scopeHasDataType(scope: ColumnScope): boolean;Parameters
| Parameter | Type | Description |
|---|---|---|
| scope | ColumnScope | Scope to check |
Returns
boolean
scopeHasOnlyBooleanDataType
True if Scope is DataTypes and contains just 'Boolean'
scopeHasOnlyBooleanDataType(scope: ColumnScope): boolean;Parameters
| Parameter | Type | Description |
|---|---|---|
| scope | ColumnScope | Scope to check |
Returns
boolean
scopeIsAll
True if Scope is 'All'
scopeIsAll(scope: ColumnScope): boolean;Parameters
| Parameter | Type | Description |
|---|---|---|
| scope | ColumnScope | Scope to check |
Returns
boolean
scopeIsEmpty
True if Scope is empty
scopeIsEmpty(scope: ColumnScope): boolean;Parameters
| Parameter | Type | Description |
|---|---|---|
| scope | ColumnScope | Scope to check |
Returns
boolean