Class

# DBKit.Dialog

<div class="rst-class">

forsearch

</div>

DBKit.Dialog

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

## Description

Used to display DBKit controls with data from the current row of a database table to which it is assigned.

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

## Properties

<div class="rst-class">

table-centered_columns_3_and_4

</div>

| Name                                                                      | Type                                  | Read-Only | Shared |
|---------------------------------------------------------------------------|---------------------------------------|-----------|--------|
| `AutomaticHints<dbkit.dialog.automatichints>`                             | `Boolean</api/data_types/boolean>`    |           |        |
| `ConfirmCancelButtonCaption<dbkit.dialog.confirmcancelbuttoncaption>`     | `String</api/data_types/string>`      |           |        |
| `ConfirmContinueButtonCaption<dbkit.dialog.confirmcontinuebuttoncaption>` | `String</api/data_types/string>`      |           |        |
| `CurrentRow<dbkit.dialog.currentrow>`                                     | `DBKit.Row</api/databases/dbkit/row>` |           |        |
| `Database<dbkit.dialog.database>`                                         | `Database</api/databases/database>`   |           |        |
| `DeleteConfirmExplanation<dbkit.dialog.deleteconfirmexplanation>`         | `String</api/data_types/string>`      |           |        |
| `DeleteConfirmMessage<dbkit.dialog.deleteconfirmmessage>`                 | `String</api/data_types/string>`      |           |        |
| `DeleteConfirmTitle<dbkit.dialog.deleteconfirmtitle>`                     | `String</api/data_types/string>`      |           |        |
| `Limit<dbkit.dialog.limit>`                                               | `Integer</api/data_types/integer>`    |           |        |
| `OrderBy<dbkit.dialog.orderby>`                                           | `String</api/data_types/string>`      |           |        |
| `TableName<dbkit.dialog.tablename>`                                       | `String</api/data_types/string>`      |           |        |
| `TableRelationships<dbkit.dialog.tablerelationships>`                     | `String</api/data_types/string>`      |           |        |
| `UnsavedChangesExplanation<dbkit.dialog.unsavedchangesexplanation>`       | `String</api/data_types/string>`      |           |        |
| `UnsavedChangesMessage<dbkit.dialog.unsavedchangesmessage>`               | `String</api/data_types/string>`      |           |        |
| `UnsavedChangesTitle<dbkit.dialog.unsavedchangestitle>`                   | `String</api/data_types/string>`      |           |        |
| `Where<dbkit.dialog.where>`                                               | `String</api/data_types/string>`      |           |        |

## Property descriptions

<div id="dbkit.dialog.automatichints">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.Dialog.AutomaticHints

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

> Whether the controls on this dialog automatically set their Hint from the database column's display name when no Hint is set.
>
> The default is True.

<div id="dbkit.dialog.confirmcancelbuttoncaption">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.Dialog.ConfirmCancelButtonCaption

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

> The caption of the Cancel button in the unsaved-changes confirmation dialog.
>
> The default is "Cancel".

<div id="dbkit.dialog.confirmcontinuebuttoncaption">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.Dialog.ConfirmContinueButtonCaption

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

> The caption of the Continue button in the unsaved-changes confirmation dialog.
>
> The default is "Continue".

<div id="dbkit.dialog.currentrow">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.Dialog.CurrentRow

**CurrentRow** As `DBKit.Row</api/databases/dbkit/row>`

> The current row of the database table this dialog operates on.

<div id="dbkit.dialog.database">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.Dialog.Database

**Database** As `Database</api/databases/database>`

> The database this dialog operates on.

<div id="dbkit.dialog.deleteconfirmexplanation">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.Dialog.DeleteConfirmExplanation

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

> The explanation text of the delete confirmation dialog.
>
> The default is "This action cannot be undone."

<div id="dbkit.dialog.deleteconfirmmessage">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.Dialog.DeleteConfirmMessage

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

> The message text of the delete confirmation dialog.
>
> The default is "Are you sure you want to delete this record?".

<div id="dbkit.dialog.deleteconfirmtitle">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.Dialog.DeleteConfirmTitle

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

> The title of the delete confirmation dialog.
>
> The default is "Delete Record".

<div id="dbkit.dialog.limit">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.Dialog.Limit

**Limit** As `Integer</api/data_types/integer>`

> The maximum number of rows loaded from the database table.

<div id="dbkit.dialog.orderby">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.Dialog.OrderBy

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

> The sort order used when loading rows from the database table.

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

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.Dialog.TableName

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

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

<div id="dbkit.dialog.tablerelationships">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.Dialog.TableRelationships

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

> The relationships between this dialog's table and other tables, with one relationship per line in the format childTableName.childColumnName = parentTableName.parentColumnName. Appending = viaColumnName is optional and specifies the via column, which identifies which relationship to use when the child table has more than one foreign key to the same parent table.
>
> The child column is the foreign key and the parent column is the primary key it refers to. The relationships are loaded when the dialog opens and are used to find related rows.

<div id="dbkit.dialog.unsavedchangesexplanation">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.Dialog.UnsavedChangesExplanation

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

> The explanation text of the unsaved-changes confirmation dialog.
>
> The default is "If you continue, your changes will not be saved.".

<div id="dbkit.dialog.unsavedchangesmessage">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.Dialog.UnsavedChangesMessage

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

> The message text of the unsaved-changes confirmation dialog.
>
> The default is "You have unsaved changes.".

<div id="dbkit.dialog.unsavedchangestitle">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.Dialog.UnsavedChangesTitle

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

> The title of the unsaved-changes confirmation dialog.
>
> The default is "Unsaved Changes".

<div id="dbkit.dialog.where">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.Dialog.Where

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

> The filter used when loading rows from the database table.

## Notes

### Using a dialog

To display a modal dialog on the web, create a DBKit.Dialog subclass and add DBKit controls to it like any other layout. To pass data in and out of the dialog, add public properties to the subclass: set them before calling Show, and read them in the dialog's Dismissed event. For example, the ChooseCustomerDialog in the DBKit Web example project has a CustomerID property: the page sets it to the current customer before showing the dialog, then reads it back in Dismissed to update the invoice. On desktop there is no DBKit.Dialog; use a `DBKit.Window</api/databases/dbkit/window>` subclass shown with ShowModal instead.

### Localization

Localize the layout's user-facing text (the delete-confirmation and unsaved-changes dialog text and the confirmation button captions) the standard Xojo way: assign a dynamic constant to each property and provide translations for as many languages as you need, or localize the property values directly.

## Compatibility

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

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

<div class="seealso">

`WebDialog</api/user_interface/web/webdialog>` parent class; `DBKit.Row</api/databases/dbkit/row>` class.

</div>

</div>
