Data Set Forms
Summary
- Data Sets are defined in Adaptable Options
- Data Set Definitions can include a Form definition to allow the Data Set to be populated based on user choice
DataSets can, optionally, include form definitions.
These allow users to further 'filter' what data will be returned by the DataSet.
Whenever a DataSet with a form definition is selected, AdapTable will dynamically display an Adaptable Form.
Handling Form Submission
Unlike with other DataSets, AdapTable doesn't fire the DataSet Selected Event for DataSets that display forms.
Instead the data must be provided to AdapTable via a button provided within the form definition.
Caution
Make sure that your Form includes a button and an implementation for the onClick function
Deep Dive
Understanding DataSet Form Buttons onClick
Using Data Set Forms
- In this example we provide 2 DataSets in the
dataSetsproperty of Data Set Options: JavaScript- loads Frameworks where Language is 'JavaScript'
- subscribes to DataSet Selected Event and populates AdapTable using the Grid API
- is loaded at start-up (by using the
setDataSetmethod in DataSet API)
TypeScript- loads Frameworks where Language is 'TypeScript'
- displays an Adaptable Form, allowing users to set additional filters
- the form contains an 'OK' button which has an
onClickhandler which sends data to AdapTable also using the Grid API
Expand to see the DataSet (and Form) definitions
Try It Out
- Switch between the 2 DataSets to see the different data loaded
- Use the Form in
TypeScriptto manipulate how many rows are returned to AdapTable