CustomSortApi

Provides run-time access to the Custom Sort function

TypeScript
export interface CustomSortApi

Methods

MethodDescription
addCustomSort(customSort)Adds a Custom Sort to Custom Sort collection in Adaptable State
createCustomSort(columnId, values)Creates new Custom Sort based on given values
deleteCustomSort(columnId)Removes Custom Sort for a given ColumnId
editCustomSort(columnId, values)Updates existing Custom Sort with new set of Sorted Values
getAllActiveCustomSort()Retrieves all Custom Sorts that are active (not-suspended) in Adaptable State
getAllCustomSort()Retrieves all Custom Sorts in Adaptable State
getAllSuspendedCustomSort()Retrieves all Custom Sorts that are suspended in Adaptable State
getCustomSortByColumn(columnId)Retrieves Custom Sort from Adaptable State for given ColumnId
getCustomSortState()Retrieves Custom Sort section from Adaptable State
showCustomSortPopup()Opens Custom Sort popup screen
suspendCustomSort(customSort)Suspends Custom Sort
unSuspendCustomSort(customSort)Un-suspends or activates a suspended Custom Sort

Method Details

addCustomSort

Adds a Custom Sort to Custom Sort collection in Adaptable State

TypeScript
addCustomSort(customSort: CustomSort): void;
Parameters
ParameterTypeDescription
customSortCustomSortCustom Sort to add
Returns

void

createCustomSort

Creates new Custom Sort based on given values

TypeScript
createCustomSort(columnId: string, values: string[]): void;
Parameters
ParameterTypeDescription
columnIdstringId of Column to which to apply Custom Sort
valuesstring[]Custom Sort values to apply
Returns

void

deleteCustomSort

Removes Custom Sort for a given ColumnId

TypeScript
deleteCustomSort(columnId: string): void;
Parameters
ParameterType
columnIdstring
Returns

void

editCustomSort

Updates existing Custom Sort with new set of Sorted Values

TypeScript
editCustomSort(columnId: string, values: string[]): void;
Parameters
ParameterTypeDescription
columnIdstringId of Column on which to edit the Custom Sort
valuesstring[]Custom Sort values to use (replaces what was previously used)
Returns

void

getAllActiveCustomSort

Retrieves all Custom Sorts that are active (not-suspended) in Adaptable State

TypeScript
getAllActiveCustomSort(): CustomSort[];
Returns

CustomSort[]

getAllCustomSort

Retrieves all Custom Sorts in Adaptable State

TypeScript
getAllCustomSort(): CustomSort[];
Returns

CustomSort[]

getAllSuspendedCustomSort

Retrieves all Custom Sorts that are suspended in Adaptable State

TypeScript
getAllSuspendedCustomSort(): CustomSort[];
Returns

CustomSort[]

getCustomSortByColumn

Retrieves Custom Sort from Adaptable State for given ColumnId

TypeScript
getCustomSortByColumn(columnId: string): CustomSort;
Parameters
ParameterTypeDescription
columnIdstringId of Column to retrieve Custom Sort for
Returns

CustomSort

getCustomSortState

Retrieves Custom Sort section from Adaptable State

TypeScript
getCustomSortState(): CustomSortState;
Returns

CustomSortState

showCustomSortPopup

Opens Custom Sort popup screen

TypeScript
showCustomSortPopup(): void;
Returns

void

suspendCustomSort

Suspends Custom Sort

TypeScript
suspendCustomSort(customSort: CustomSort): void;
Parameters
ParameterTypeDescription
customSortCustomSortCustom Sort to suspend
Returns

void

unSuspendCustomSort

Un-suspends or activates a suspended Custom Sort

TypeScript
unSuspendCustomSort(customSort: CustomSort): void;
Parameters
ParameterTypeDescription
customSortCustomSortCustom Sort to suspend
Returns

void