Provides access to a suite of functions related to the Column Scope object

TypeScript
export interface

Methods

MethodDescription
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

TypeScript
areAllBooleanColumnsInScope(scope: ColumnScope): boolean;
Parameters
ParameterTypeDescription
scopeColumnScopeScope to check
Returns

boolean

createCellColorRangesForScope

Creates Cell Color Ranges (used in Format Column) for given Scope

TypeScript
createCellColorRangesForScope(scope: ColumnScope): CellColorRange[];
Parameters
ParameterTypeDescription
scopeColumnScopeScope to use
Returns

CellColorRange[]

getColumnIdsInScope

Returns all the ColumnIds in the Scope

TypeScript
getColumnIdsInScope(scope: ColumnScope): string[] | undefined;
Parameters
ParameterTypeDescription
scopeColumnScopeScope to check
Returns

string[] | undefined

getColumnsInScope

Returns list of all Columns in the given Scope

TypeScript
getColumnsInScope(scope: ColumnScope): AdaptableColumn[];
Parameters
ParameterTypeDescription
scopeColumnScopethe Scope to check
Returns

AdaptableColumn[]

getColumnTypesInScope

Returns all the ColumnTypes in the Scope

TypeScript
getColumnTypesInScope(scope: ColumnScope): string[] | undefined;
Parameters
ParameterTypeDescription
scopeColumnScopeScope to check
Returns

string[] | undefined

getDataTypesInScope

Returns all the DataTypes in the Scope

TypeScript
getDataTypesInScope(scope: ColumnScope): ScopeDataType[] | undefined;
Parameters
ParameterTypeDescription
scopeColumnScopeScope to check
Returns

ScopeDataType[] | undefined

getScopeDescription

Provides a description for the Scope

TypeScript
getScopeDescription(scope: ColumnScope): string;
Parameters
ParameterTypeDescription
scopeColumnScopeThe Scope to check
Returns

string

getScopeToString

Gets string representation of the Scope

TypeScript
getScopeToString(scope: ColumnScope): string;
Parameters
ParameterTypeDescription
scopeColumnScopeScope to check
Returns

string

getSingleColumnInScope

Gets the only Column in given Scope

TypeScript
getSingleColumnInScope(scope: ColumnScope): string | undefined;
Parameters
ParameterTypeDescription
scopeColumnScopeScope to check
Returns

string | undefined

isColumnInDateScope

True if Scope has Data DataType which contains Column

TypeScript
isColumnInDateScope(column: AdaptableColumn, scope: ColumnScope): boolean;
Parameters
ParameterTypeDescription
columnAdaptableColumnColumn to check
scopeColumnScopeScope to check
Returns

boolean

isColumnInNumericScope

True if Scope has Numeric DataType containing Column

TypeScript
isColumnInNumericScope(column: AdaptableColumn, scope: ColumnScope): boolean;
Parameters
ParameterTypeDescription
columnAdaptableColumnColumn to check
scopeColumnScopeScope to check
Returns

boolean

isColumnInScope

True if Column is in given Scope

TypeScript
isColumnInScope(column: AdaptableColumn | undefined, scope: ColumnScope): boolean;
Parameters
ParameterTypeDescription
columnAdaptableColumn | undefinedColumn to check
scopeColumnScopeThe Scope to check
Returns

boolean

isColumnInScopeColumns

True if Column is in Scope's 'ColumnIds' section

TypeScript
isColumnInScopeColumns(column: AdaptableColumn, scope: ColumnScope): boolean;
Parameters
ParameterTypeDescription
columnAdaptableColumnColumn to check
scopeColumnScopeScope to check
Returns

boolean

isColumnInTextScope

True if Scope has text DataType containing Column

TypeScript
isColumnInTextScope(column: AdaptableColumn, scope: ColumnScope): boolean;
Parameters
ParameterTypeDescription
columnAdaptableColumnColumn to check
scopeColumnScopeScope to check
Returns

boolean

isPrimaryKeyColumnInScopeColumns

Whether PK column is included in Scope's column section

TypeScript
isPrimaryKeyColumnInScopeColumns(scope: ColumnScope): boolean;
Parameters
ParameterTypeDescription
scopeColumnScopeScope 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

TypeScript
isScopeInScope(scopeA: ColumnScope, scopeB: ColumnScope): boolean;
Parameters
ParameterTypeDescription
scopeAColumnScopefirst Scope
scopeBColumnScopesecond Scope
Returns

boolean

isSingleBooleanColumnScope

True if Scope contains just 1 boolean Column

TypeScript
isSingleBooleanColumnScope(scope: ColumnScope): boolean;
Parameters
ParameterTypeDescription
scopeColumnScopeScope to check
Returns

boolean

isSingleColumnScope

True if Scope contains just 1 ColumnId

TypeScript
isSingleColumnScope(scope: ColumnScope): boolean;
Parameters
ParameterTypeDescription
scopeColumnScopeScope to check
Returns

boolean

isSingleNumericColumnScope

True if Scope contains just 1 numeric Column

TypeScript
isSingleNumericColumnScope(scope: ColumnScope): boolean;
Parameters
ParameterTypeDescription
scopeColumnScopeScope to check
Returns

boolean

scopeHasColumns

True if Scope contains ColumnIds

TypeScript
scopeHasColumns(scope: ColumnScope): boolean;
Parameters
ParameterTypeDescription
scopeColumnScopeScope to check
Returns

boolean

scopeHasColumnType

True if Scope contains ColumnTypes

TypeScript
scopeHasColumnType(scope: ColumnScope): boolean;
Parameters
ParameterTypeDescription
scopeColumnScopeScope to check
Returns

boolean

scopeHasDataType

True if Scope contains DataTypes

TypeScript
scopeHasDataType(scope: ColumnScope): boolean;
Parameters
ParameterTypeDescription
scopeColumnScopeScope to check
Returns

boolean

scopeHasOnlyBooleanDataType

True if Scope is DataTypes and contains just 'Boolean'

TypeScript
scopeHasOnlyBooleanDataType(scope: ColumnScope): boolean;
Parameters
ParameterTypeDescription
scopeColumnScopeScope to check
Returns

boolean

scopeIsAll

True if Scope is 'All'

TypeScript
scopeIsAll(scope: ColumnScope): boolean;
Parameters
ParameterTypeDescription
scopeColumnScopeScope to check
Returns

boolean

scopeIsEmpty

True if Scope is empty

TypeScript
scopeIsEmpty(scope: ColumnScope): boolean;
Parameters
ParameterTypeDescription
scopeColumnScopeScope to check
Returns

boolean