Data Set Technical Reference
Summary
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:
| Property | Description |
|---|---|
| dataSet | The DataSet that has been selected |
| adaptableContext | Custom 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
| Property | Description |
|---|---|
| dataSets | Collection of Data Sets to provide data to AdapTable |
Data Set Object
A Data Set is defined as follows:
| Property | Description |
|---|---|
| description | Describes the Data Set |
| form | Params for Data Set popup form |
| info | Additional info for Data Set |
| name | Name of Data Set |
| IsReadOnly | Sets Entity to ReadOnly (overwriting a Strategy Entitlement of 'Full') |
Adaptable Form
The form in the Data Set is defined as follows:
| Property | Description |
|---|---|
| buttons | Buttons to include in the Form |
| description | Additional information to appear in the Form |
| fields | Collection of Dynamic Fields to display |
| title | Title to appear in the Form |
Data Set API
| Method | Description |
|---|---|
| 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) |