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.

PropertyDescriptionDefault
autoHandleWhether AdapTable automatically updates AG Grid data model with created/edited/deleted rowstrue
disableInlineEditingPrevents direct editing in Grid cells even for editable columnsfalse
includeColumnInRowFormIs given Column displayed in Row Formtrue
onRowFormSubmitEvent fired when a Row Form is submitted via a standard button provided by AdapTable; this is not invoked when custom form buttons are providedundefined
rowFormButtonsCustom form buttons; if provided, need to handle form submission explicitly
rowFormDescriptionCustom form description providerundefined
rowFormFieldLabelCustom form field label providerundefined
rowFormTitleCustom form title provider'Create New Row'/'Edit Row'
setPrimaryKeyValueFunction called when auto-handling 'create' or 'clone' Command Button; returned value should be valid for Primary Key columnundefined

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:

PropertyDescription
formDataData entered in the Form
rowNodeNode being added
typeSpecifies its a Created Row Form
adaptableContextCustom application Context provided in AdaptableOptions.adaptableContext
PropertyDescription
formDataData entered in the Form
rowNodeNode being edited
typeSpecifies its an Edited Row Form
adaptableContextCustom application Context provided in AdaptableOptions.adaptableContext
PropertyDescription
rowNodeNode being deleted
typeSpecifies its a Deleted Row Form
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('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:

MethodDescription
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