Data Set Technical Reference

Summary

  • Data Sets are defined in DataSet Options
  • Data Set Selected Event is raised when a Data Set has been selected by the User
  • Data Set API Section of Adaptable API accesses Data Set functionality at runtime

DataSet Selected Event

The DataSet Selector provides a way to supply an entirely new Data Set to AdapTable based on user selection.

Caution

This Event is only fired if the DataSet definition does not contain a Form

Hint

If the DataSet contains a Form, any wiring should be done in the onClick of the form's submit Button

DataSetSelectedInfo

The DatasetSelectedInfo object returned by the Event contains the DataSet that has beeen selected:

PropertyDescription
dataSetThe DataSet that has been selected
adaptableContextCustom application Context provided in AdaptableOptions.adaptableContext

Event Subscription

Subscribing to the Event is done the same way as with all Adaptable Events:

api.eventApi.on('DataSetSelected', (eventInfo: DataSetSelectedInfo) => {
  // do something with the info
});

Data Set Options

PropertyDescription
dataSetsCollection of Data Sets to provide data to AdapTable

Data Set Object

A Data Set is defined as follows:

PropertyDescription
descriptionDescribes the Data Set
formParams for Data Set popup form
infoAdditional info for Data Set
nameName of Data Set
IsReadOnlySets Entity to ReadOnly (overwriting a Strategy Entitlement of 'Full')

Adaptable Form

The form in the Data Set is defined as follows:

PropertyDescription
buttonsButtons to include in the Form
descriptionAdditional information to appear in the Form
fieldsCollection of Dynamic Fields to display
titleTitle to appear in the Form

Data Set API

MethodDescription
clearCurrentDataSet()Clears currently selected Data Set
getCurrentDataSet()Retrieves the currently applied Data Set
getDataSetByName(dataSetName)Retrieves Data Set from State with given name
getDataSets()Retrieves the Data Sets from Data Set Options
openDataSetSettingsPanel()Opens Settings Panel with Data Set section selected and visible
setDataSet(dataSetName)Loads the given Data Set (makes it the Current one)