Row Forms Technical Reference
Summary
- Row Form Options provides functions for managing Row Forms
- The Row Form Submitted Event fire when Row Forms are submitted
- The Row Form API contains functions to display Row Forms progammatically
Row Form Options
The Row Form Options section of Adaptable Options is used to configure Row Forms.
| Property | Description | Default |
|---|---|---|
| autoHandle | Whether AdapTable automatically updates AG Grid data model with created/edited/deleted rows | true |
| disableInlineEditing | Prevents direct editing in Grid cells even for editable columns | false |
| includeColumnInRowForm | Is given Column displayed in Row Form | true |
| onRowFormSubmit | Event fired when a Row Form is submitted via a standard button provided by AdapTable; this is not invoked when custom form buttons are provided | undefined |
| rowFormButtons | Custom form buttons; if provided, need to handle form submission explicitly | |
| rowFormDescription | Custom form description provider | undefined |
| rowFormFieldLabel | Custom form field label provider | undefined |
| rowFormTitle | Custom form title provider | 'Create New Row'/'Edit Row' |
| setPrimaryKeyValue | Function called when auto-handling 'create' or 'clone' Command Button; returned value should be valid for Primary Key column | undefined |
Row Form Submitted Event
AdapTable fires the Row Form Submitted Event when an edit or create Row Form is submitted (or a delete ActionRowButton is clicked).
This allows developers to handle the form submission themselves, and provide any additional actions, validation or messages to backend services as required.
Hint
AdapTable handles all row manipulation directly, bypassing this event, if autoHandle is set to true in Row Form Options
RowFormSubmittedInfo
The RowFormSubmittedInfo object can be one of 3 types:
- a
CreatedRowInfo- which is defined as follows
| Property | Description |
|---|---|
| formData | Data entered in the Form |
| rowNode | Node being added |
| type | Specifies its a Created Row Form |
| adaptableContext | Custom application Context provided in AdaptableOptions.adaptableContext |
- an
EditedRowInfo- which is defined as follows
| Property | Description |
|---|---|
| formData | Data entered in the Form |
| rowNode | Node being edited |
| type | Specifies its an Edited Row Form |
| adaptableContext | Custom application Context provided in AdaptableOptions.adaptableContext |
- a
DeletedRowInfo- which is defined as follows
| Property | Description |
|---|---|
| rowNode | Node being deleted |
| type | Specifies its a Deleted Row Form |
| 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('RowFormSubmitted', (eventInfo: RowFormSubmittedInfo) => {
// do something with the info
});Row Form API
The Row Form API section of Adaptable API enables Row Forms to be displayed:
| Method | Description |
|---|---|
| displayCloneRowForm(primaryKey) | Open create dialog for cloning an existing row |
| displayCreateRowForm() | Open create dialog for a new row |
| displayEditRowForm(primaryKey) | Open edit dialog for row with the given primary key value |