Class

# DBKit.EditingButton

<div class="rst-class">

forsearch

</div>

DBKit.EditingButton

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

## Description

Provides buttons that allow the user to edit the current row of a database table, delete the current row, undo changes to the current row, and create new rows.

Which buttons appear is controlled by the `EditRow<dbkit.editingbutton.editrow>`, `DeleteRow<dbkit.editingbutton.deleterow>`, `UndoRowChanges<dbkit.editingbutton.undorowchanges>`, and `NewRow<dbkit.editingbutton.newrow>` properties.

Only the members declared by <span class="title-ref">DBKit.EditingButton</span> itself are described here; for the inherited members, see `the parent classes<dbkit.editingbutton.seealso>`.

## Properties

<div class="rst-class">

table-centered_columns_3_and_4

</div>

| Name                                                       | Type                               | Read-Only | Shared |
|------------------------------------------------------------|------------------------------------|-----------|--------|
| `DeleteRelatedRows<dbkit.editingbutton.deleterelatedrows>` | `Boolean</api/data_types/boolean>` |           |        |
| `DeleteRow<dbkit.editingbutton.deleterow>`                 | `Boolean</api/data_types/boolean>` |           |        |
| `DoneCaption<dbkit.editingbutton.donecaption>`             | `String</api/data_types/string>`   |           |        |
| `EditCaption<dbkit.editingbutton.editcaption>`             | `String</api/data_types/string>`   |           |        |
| `EditRow<dbkit.editingbutton.editrow>`                     | `Boolean</api/data_types/boolean>` |           |        |
| `NewRow<dbkit.editingbutton.newrow>`                       | `Boolean</api/data_types/boolean>` |           |        |
| `TableName<dbkit.editingbutton.tablename>`                 | `String</api/data_types/string>`   |           |        |
| `UndoRowChanges<dbkit.editingbutton.undorowchanges>`       | `Boolean</api/data_types/boolean>` |           |        |

## Methods

<div class="rst-class">

table-centered_column_4

</div>

| Name                                              | Parameters | Returns                          | Shared |
|---------------------------------------------------|------------|----------------------------------|--------|
| `TableName<dbkit.editingbutton.tablename-method>` |            | `String</api/data_types/string>` |        |

## Events

<div class="rst-class">

table-centered_column_4

</div>

| Name                                                 | Parameters                                     | Returns                          |
|------------------------------------------------------|------------------------------------------------|----------------------------------|
| `Error<dbkit.editingbutton.error>`                   | buttonName As `String</api/data_types/string>` | `String</api/data_types/string>` |
| `RowChanged<dbkit.editingbutton.rowchanged>`         | row As `DBKit.Row</api/databases/dbkit/row>`   |                                  |
| `RowCreated<dbkit.editingbutton.rowcreated>`         | row As `DBKit.Row</api/databases/dbkit/row>`   |                                  |
| `RowDeleted<dbkit.editingbutton.rowdeleted>`         | row As `DBKit.Row</api/databases/dbkit/row>`   |                                  |
| `RowEditing<dbkit.editingbutton.rowediting>`         | row As `DBKit.Row</api/databases/dbkit/row>`   |                                  |
| `RowLoaded<dbkit.editingbutton.rowloaded>`           | row As `DBKit.Row</api/databases/dbkit/row>`   |                                  |
| `RowNotSelected<dbkit.editingbutton.rownotselected>` |                                                |                                  |
| `RowSaved<dbkit.editingbutton.rowsaved>`             | row As `DBKit.Row</api/databases/dbkit/row>`   |                                  |
| `RowSaving<dbkit.editingbutton.rowsaving>`           | row As `DBKit.Row</api/databases/dbkit/row>`   |                                  |
| `RowUndone<dbkit.editingbutton.rowundone>`           | row As `DBKit.Row</api/databases/dbkit/row>`   |                                  |

## Property descriptions

<div id="dbkit.editingbutton.deleterelatedrows">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DBKit.EditingButton.DeleteRelatedRows

**DeleteRelatedRows** As `Boolean</api/data_types/boolean>`

> If `True</api/language/true>`, the rows related to the deleted row are deleted as well.
>
> The default is `False</api/language/false>`.

<div id="dbkit.editingbutton.deleterow">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DBKit.EditingButton.DeleteRow

**DeleteRow** As `Boolean</api/data_types/boolean>`

> If `True</api/language/true>`, the control includes a button that deletes the current row.
>
> The default is `False</api/language/false>`.

<div id="dbkit.editingbutton.donecaption">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DBKit.EditingButton.DoneCaption

**DoneCaption** As `String</api/data_types/string>`

> The caption displayed on the Edit button while the current row is being edited.
>
> The default is "Done".

<div id="dbkit.editingbutton.editcaption">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DBKit.EditingButton.EditCaption

**EditCaption** As `String</api/data_types/string>`

> The caption displayed on the Edit button when the current row is not being edited.
>
> The default is "Edit".

<div id="dbkit.editingbutton.editrow">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DBKit.EditingButton.EditRow

**EditRow** As `Boolean</api/data_types/boolean>`

> If `True</api/language/true>`, the control includes a button that edits the current row.
>
> The default is `False</api/language/false>`.

<div id="dbkit.editingbutton.newrow">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DBKit.EditingButton.NewRow

**NewRow** As `Boolean</api/data_types/boolean>`

> If `True</api/language/true>`, the control includes a button that creates a new row.
>
> The default is `False</api/language/false>`.

<div id="dbkit.editingbutton.tablename">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DBKit.EditingButton.TableName

**TableName** As `String</api/data_types/string>`

> The name of the database table this control operates on.

<div id="dbkit.editingbutton.undorowchanges">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DBKit.EditingButton.UndoRowChanges

**UndoRowChanges** As `Boolean</api/data_types/boolean>`

> If `True</api/language/true>`, the control includes a button that undoes the changes made to the current row.
>
> The default is `False</api/language/false>`.

## Method descriptions

<div id="dbkit.editingbutton.tablename-method">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DBKit.EditingButton.TableName

**TableName**() As `String</api/data_types/string>`

> Returns the name of the database table for this control: the `TableName<dbkit.editingbutton.tablename>` property if set, otherwise the table name of the control's layout.

## Event descriptions

<div id="dbkit.editingbutton.error">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DBKit.EditingButton.Error

**Error**(buttonName As `String</api/data_types/string>`) As `String</api/data_types/string>`

> A DatabaseException occurred as a result of the user pressing the button whose name is passed to this event.
>
> Implement this event to display your own error message instead of DBKit's default message. Return the message to display, or return an empty string to display no message at all. If you do not implement this event, DBKit displays a default error message.

<div id="dbkit.editingbutton.rowchanged">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DBKit.EditingButton.RowChanged

**RowChanged**(row As `DBKit.Row</api/databases/dbkit/row>`)

> The current row (passed to the event) has been changed.

<div id="dbkit.editingbutton.rowcreated">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DBKit.EditingButton.RowCreated

**RowCreated**(row As `DBKit.Row</api/databases/dbkit/row>`)

> A new row (passed to the event) was just created and is now the current row.

<div id="dbkit.editingbutton.rowdeleted">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DBKit.EditingButton.RowDeleted

**RowDeleted**(row As `DBKit.Row</api/databases/dbkit/row>`)

> The current row (passed to the event) has been deleted.

<div id="dbkit.editingbutton.rowediting">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DBKit.EditingButton.RowEditing

**RowEditing**(row As `DBKit.Row</api/databases/dbkit/row>`)

> The current row (passed to the event) is being edited by the user.

<div id="dbkit.editingbutton.rowloaded">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DBKit.EditingButton.RowLoaded

**RowLoaded**(row As `DBKit.Row</api/databases/dbkit/row>`)

> The current row (passed to the event) has been loaded.

<div id="dbkit.editingbutton.rownotselected">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DBKit.EditingButton.RowNotSelected

**RowNotSelected**

> There is no row currently selected.

<div id="dbkit.editingbutton.rowsaved">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DBKit.EditingButton.RowSaved

**RowSaved**(row As `DBKit.Row</api/databases/dbkit/row>`)

> The current row (passed to the event) has been saved.

<div id="dbkit.editingbutton.rowsaving">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DBKit.EditingButton.RowSaving

**RowSaving**(row As `DBKit.Row</api/databases/dbkit/row>`)

> The current row (passed to this event) is about to be saved.

<div id="dbkit.editingbutton.rowundone">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DBKit.EditingButton.RowUndone

**RowUndone**(row As `DBKit.Row</api/databases/dbkit/row>`)

> The changes made to the current row (passed to this event) have been undone.

## Notes

### Working with Table rows

When the button's `TableName<dbkit.editingbutton.tablename>` matches the `TableName<dbkit.editingbutton.tablename>` of a Table on the layout, the delete and new buttons act on the Table's rows. Edit and undo for a Table displaying rows from a related many table are not supported.

## Compatibility

|                       |              |
|-----------------------|--------------|
| **Project Types**     | Desktop, Web |
| **Operating Systems** | All          |

<div id="dbkit.editingbutton.seealso">

<div class="seealso">

`DesktopSegmentedButton</api/user_interface/desktop/desktopsegmentedbutton>` (desktop) and `WebSegmentedButton</api/user_interface/web/websegmentedbutton>` (web) parent classes; `DBKit.Row</api/databases/dbkit/row>` class.

</div>

</div>
