Class

# DBKit.NewButton

<div class="rst-class">

forsearch

</div>

DBKit.NewButton

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

## Description

Creates a new row for the database table to which it's assigned.

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

## Properties

<div class="rst-class">

table-centered_column_4

</div>

| Name                                   | Type                             | Default | Description |
|----------------------------------------|----------------------------------|---------|-------------|
| `TableName<dbkit.newbutton.tablename>` | `String</api/data_types/string>` |         |             |

## Methods

<div class="rst-class">

table-centered_column_4

</div>

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

## Events

<div class="rst-class">

table-centered_column_4

</div>

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

## Property descriptions

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

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.NewButton.TableName

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

> The name of the database table for which this button creates a new row.

## Method descriptions

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

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.NewButton.TableName

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

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

## Event descriptions

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

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.NewButton.Error

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

> A DatabaseException occurred when the control attempted to create a new row.
>
> 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.newbutton.rowchanged">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.NewButton.RowChanged

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

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

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

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.NewButton.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.newbutton.rowdeleted">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.NewButton.RowDeleted

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

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

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

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.NewButton.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.newbutton.rowloaded">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.NewButton.RowLoaded

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

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

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

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.NewButton.RowNotSelected

**RowNotSelected**

> There is no row currently selected.

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

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.NewButton.RowSaved

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

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

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

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.NewButton.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.newbutton.rowundone">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.NewButton.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

### Creating Table rows

When the button's `TableName<dbkit.newbutton.tablename>` matches the `TableName<dbkit.newbutton.tablename>` of a Table on the layout rather than the layout's own TableName, pressing the button creates a new row in the Table.

## Compatibility

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

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

<div class="seealso">

`DesktopButton</api/user_interface/desktop/desktopbutton>` (desktop) and `WebButton</api/user_interface/web/webbutton>` (web) parent classes; `DBKit.Row</api/databases/dbkit/row>` class.

</div>

</div>
