Interface

# DBKit.SDK.Layout

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout

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

## Description

The interface a layout offers to the controls on it. DBKit's own layouts implement it: Window and Container in desktop projects, Page, Container and Dialog in web projects.

A control reaches its layout through the Layout method of `DBKit.SDK.RowBase</api/databases/dbkit/sdk/rowbase>`, and through this interface it can work with the layout as a whole: get and set the current row, navigate between rows, start a new row, ask about the database schema, and send row events to the other controls. Most methods exist so that DBKit's own controls can do their work; a custom control typically needs only a few of them, such as CurrentRow, UpdateCurrentRow, IsValidColumnName and PrimaryKeyColumnNameForTable.

## `Methods</getting_started/using_the_xojo_language/methods>`

<div class="rst-class">

methods-table

</div>

| Name                                                                                      | Parameters                                                                                            | Returns                                                               |
|-------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------|
| `Close<dbkit.sdk.layout.close>`                                                           |                                                                                                       |                                                                       |
| `ConfirmDeleteRow<dbkit.sdk.layout.confirmdeleterow>`                                     | deleteRelatedRows As `Boolean</api/data_types/boolean>` = `True</api/language/true>`                  |                                                                       |
| `CurrentRow<dbkit.sdk.layout.currentrow>`                                                 |                                                                                                       | `DBKit.Row</api/databases/dbkit/row>`                                 |
| `CurrentRow<dbkit.sdk.layout.currentrow>`                                                 | Assigns row As `DBKit.Row</api/databases/dbkit/row>`                                                  |                                                                       |
| `DBKitControls<dbkit.sdk.layout.dbkitcontrols>`                                           |                                                                                                       | `DBKit.SDK.RowBase</api/databases/dbkit/sdk/rowbase>`()               |
| `EditRow<dbkit.sdk.layout.editrow>`                                                       |                                                                                                       |                                                                       |
| `ForeignKeyColumnName<dbkit.sdk.layout.foreignkeycolumnname>`                             | primaryKeyTable As `String</api/data_types/string>`                                                   | `String</api/data_types/string>`                                      |
| `GetConfirmCancelButtonCaption<dbkit.sdk.layout.getconfirmcancelbuttoncaption>`           |                                                                                                       | `String</api/data_types/string>`                                      |
| `GetConfirmContinueButtonCaption<dbkit.sdk.layout.getconfirmcontinuebuttoncaption>`       |                                                                                                       | `String</api/data_types/string>`                                      |
| `GetDatabase<dbkit.sdk.layout.getdatabase>`                                               |                                                                                                       | `Database</api/databases/database>`                                   |
| `GetDatabaseDisconnectedMessage<dbkit.sdk.layout.getdatabasedisconnectedmessage>`         |                                                                                                       | `String</api/data_types/string>`                                      |
| `GetDatabaseReconnectedMessage<dbkit.sdk.layout.getdatabasereconnectedmessage>`           |                                                                                                       | `String</api/data_types/string>`                                      |
| `GetDeleteConfirmExplanation<dbkit.sdk.layout.getdeleteconfirmexplanation>`               |                                                                                                       | `String</api/data_types/string>`                                      |
| `GetDeleteConfirmMessage<dbkit.sdk.layout.getdeleteconfirmmessage>`                       |                                                                                                       | `String</api/data_types/string>`                                      |
| `GetDeleteDialogTitle<dbkit.sdk.layout.getdeletedialogtitle>`                             |                                                                                                       | `String</api/data_types/string>`                                      |
| `GetNamesOfColumnsDisplayed<dbkit.sdk.layout.getnamesofcolumnsdisplayed>`                 |                                                                                                       | `String</api/data_types/string>`                                      |
| `GetOrderBy<dbkit.sdk.layout.getorderby>`                                                 |                                                                                                       | `String</api/data_types/string>`                                      |
| `GetParentLayout<dbkit.sdk.layout.getparentlayout>`                                       |                                                                                                       | `Variant</api/data_types/variant>`                                    |
| `GetRowsListControl<dbkit.sdk.layout.getrowslistcontrol>`                                 |                                                                                                       | `DBKit.SDK.RowsListControl</api/databases/dbkit/sdk/rowslistcontrol>` |
| `GetSelectedRowPrimaryKeyValue<dbkit.sdk.layout.getselectedrowprimarykeyvalue>`           |                                                                                                       | `String</api/data_types/string>`                                      |
| `GetUnsavedChangesDialogExplanation<dbkit.sdk.layout.getunsavedchangesdialogexplanation>` |                                                                                                       | `String</api/data_types/string>`                                      |
| `GetUnsavedChangesDialogMessage<dbkit.sdk.layout.getunsavedchangesdialogmessage>`         |                                                                                                       | `String</api/data_types/string>`                                      |
| `GetUnsavedChangesDialogTitle<dbkit.sdk.layout.getunsavedchangesdialogtitle>`             |                                                                                                       | `String</api/data_types/string>`                                      |
| `HasRowsListControl<dbkit.sdk.layout.hasrowslistcontrol>`                                 |                                                                                                       | `Boolean</api/data_types/boolean>`                                    |
| `IsValidColumnName<dbkit.sdk.layout.isvalidcolumnname>`                                   | columnName As `String</api/data_types/string>`, tableName As `String</api/data_types/string>` = ""    | `Boolean</api/data_types/boolean>`                                    |
| `LastRowIndex<dbkit.sdk.layout.lastrowindex>`                                             |                                                                                                       | `Integer</api/data_types/integer>`                                    |
| `LayoutControls<dbkit.sdk.layout.layoutcontrols>`                                         |                                                                                                       | Iterable                                                              |
| `LoadSelectedRow<dbkit.sdk.layout.loadselectedrow>`                                       | rc As `DBKit.SDK.Layout</api/databases/dbkit/sdk/layout>`                                             |                                                                       |
| `LoadSelectedRow<dbkit.sdk.layout.loadselectedrow>`                                       | primaryKeyValue As `String</api/data_types/string>`                                                   |                                                                       |
| `MoveFirst<dbkit.sdk.layout.movefirst>`                                                   |                                                                                                       |                                                                       |
| `MoveLast<dbkit.sdk.layout.movelast>`                                                     |                                                                                                       |                                                                       |
| `MoveNext<dbkit.sdk.layout.movenext>`                                                     |                                                                                                       |                                                                       |
| `MovePrevious<dbkit.sdk.layout.moveprevious>`                                             |                                                                                                       |                                                                       |
| `NewRow<dbkit.sdk.layout.newrow>`                                                         |                                                                                                       |                                                                       |
| `NewRowInSeparateLayout<dbkit.sdk.layout.newrowinseparatelayout>`                         |                                                                                                       | `Boolean</api/data_types/boolean>`                                    |
| `PrimaryKeyColumnNameForTable<dbkit.sdk.layout.primarykeycolumnnamefortable>`             | tableName As `String</api/data_types/string>`                                                         | `String</api/data_types/string>`                                      |
| `RaiseDatabaseConnectedEvent<dbkit.sdk.layout.raisedatabaseconnectedevent>`               |                                                                                                       |                                                                       |
| `RaiseDatabaseConnectionLostEvent<dbkit.sdk.layout.raisedatabaseconnectionlostevent>`     | error As `DatabaseException</api/databases/databaseexception>`                                        | `Boolean</api/data_types/boolean>`                                    |
| `RaiseErrorEventWithException<dbkit.sdk.layout.raiseerroreventwithexception>`             | error As `RuntimeException</api/language/runtimeexception>`                                           |                                                                       |
| `RefreshFromRow<dbkit.sdk.layout.refreshfromrow>`                                         | row As `DBKit.Row</api/databases/dbkit/row>` = Nil                                                    |                                                                       |
| `RowsAvailable<dbkit.sdk.layout.rowsavailable>`                                           |                                                                                                       | RowSet                                                                |
| `RowWithPrimaryKey<dbkit.sdk.layout.rowwithprimarykey>`                                   | primaryKey As `String</api/data_types/string>`, theTableName As `String</api/data_types/string>` = "" | `DBKit.Row</api/databases/dbkit/row>`                                 |
| `SelectedRowIndex<dbkit.sdk.layout.selectedrowindex>`                                     |                                                                                                       | `Integer</api/data_types/integer>`                                    |
| `SelectedRowIndex<dbkit.sdk.layout.selectedrowindex>`                                     | Assigns SRI As `Integer</api/data_types/integer>`                                                     |                                                                       |
| `SendEventToSubscribers<dbkit.sdk.layout.sendeventtosubscribers>`                         | theRowEvent As `DBKit.SDK.RowEvent</api/databases/dbkit/sdk/rowevent>`                                |                                                                       |
| `SetFocusToFirstControl<dbkit.sdk.layout.setfocustofirstcontrol>`                         |                                                                                                       |                                                                       |
| `SetTableName<dbkit.sdk.layout.settablename>`                                             | theTableName As `String</api/data_types/string>`                                                      |                                                                       |
| `SQLiteColumnType<dbkit.sdk.layout.sqlitecolumntype>`                                     | columnName As `String</api/data_types/string>`, SQLiteColumnType As DBKit.SQLiteColumnTypes           |                                                                       |
| `SubscribeToAllRowEvents<dbkit.sdk.layout.subscribetoallrowevents>`                       | subscriber As `DBKit.SDK.RowBase</api/databases/dbkit/sdk/rowbase>`                                   |                                                                       |
| `TableName<dbkit.sdk.layout.tablename>`                                                   |                                                                                                       | `String</api/data_types/string>`                                      |
| `UndoRowChanges<dbkit.sdk.layout.undorowchanges>`                                         |                                                                                                       |                                                                       |
| `UpdateCurrentRow<dbkit.sdk.layout.updatecurrentrow>`                                     | control As `DBKit.SDK.RowDataControl</api/databases/dbkit/sdk/rowdatacontrol>`                        |                                                                       |

## Method descriptions

<div id="dbkit.sdk.layout.close">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.Close

**Close**()

> Closes the layout.

<div id="dbkit.sdk.layout.confirmdeleterow">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.ConfirmDeleteRow

**ConfirmDeleteRow**(deleteRelatedRows As `Boolean</api/data_types/boolean>` = `True</api/language/true>`)

> Asks the user to confirm deleting the current row, using the layout's delete confirmation dialog, and deletes the row if the user confirms. When *deleteRelatedRows* is True, rows in related tables are deleted as well.

<div id="dbkit.sdk.layout.currentrow">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.CurrentRow

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

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

> Returns, or sets, the layout's current row. It is Nil when the layout has no current row. Setting it makes the given row the current row, and the layout's controls display its values.

<div id="dbkit.sdk.layout.dbkitcontrols">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.DBKitControls

**DBKitControls**() As `DBKit.SDK.RowBase</api/databases/dbkit/sdk/rowbase>`())

> Returns the DBKit controls on the layout, each as its RowBase interface.

<div id="dbkit.sdk.layout.editrow">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.EditRow

**EditRow**()

> Puts the layout's current row into edit mode.

<div id="dbkit.sdk.layout.foreignkeycolumnname">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.ForeignKeyColumnName

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

> Returns the name of the column in the layout's table that refers to the primary key of *primaryKeyTable*.

<div id="dbkit.sdk.layout.getconfirmcancelbuttoncaption">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.GetConfirmCancelButtonCaption

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

> Returns the caption the layout's confirmation dialogs use for their Cancel button.

<div id="dbkit.sdk.layout.getconfirmcontinuebuttoncaption">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.GetConfirmContinueButtonCaption

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

> Returns the caption the layout's confirmation dialogs use for their Continue button.

<div id="dbkit.sdk.layout.getdatabase">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.GetDatabase

**GetDatabase**() As `Database</api/databases/database>`

> Returns the database the layout is connected to.

<div id="dbkit.sdk.layout.getdatabasedisconnectedmessage">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.GetDatabaseDisconnectedMessage

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

> Returns the message the layout shows when its connection to the database is lost.

<div id="dbkit.sdk.layout.getdatabasereconnectedmessage">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.GetDatabaseReconnectedMessage

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

> Returns the message the layout shows when its connection to the database has been reestablished.

<div id="dbkit.sdk.layout.getdeleteconfirmexplanation">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.GetDeleteConfirmExplanation

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

> Returns the explanation text of the layout's delete confirmation dialog.

<div id="dbkit.sdk.layout.getdeleteconfirmmessage">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.GetDeleteConfirmMessage

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

> Returns the message of the layout's delete confirmation dialog.

<div id="dbkit.sdk.layout.getdeletedialogtitle">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.GetDeleteDialogTitle

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

> Returns the title of the layout's delete confirmation dialog.

<div id="dbkit.sdk.layout.getnamesofcolumnsdisplayed">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.GetNamesOfColumnsDisplayed

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

> Returns the names of the columns the layout's controls display, separated by commas.

<div id="dbkit.sdk.layout.getorderby">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.GetOrderBy

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

> Returns the ordering used by the layout's query, as an ORDER BY clause.

<div id="dbkit.sdk.layout.getparentlayout">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.GetParentLayout

**GetParentLayout**() As `Variant</api/data_types/variant>`

> Returns the layout this layout was opened from, or Nil if it was not opened from another layout.

<div id="dbkit.sdk.layout.getrowslistcontrol">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.GetRowsListControl

**GetRowsListControl**() As `DBKit.SDK.RowsListControl</api/databases/dbkit/sdk/rowslistcontrol>`

> Returns the layout's rows list control, or Nil if the layout does not have one. See also HasRowsListControl.

<div id="dbkit.sdk.layout.getselectedrowprimarykeyvalue">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.GetSelectedRowPrimaryKeyValue

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

> Returns the primary key value of the row selected in the layout's rows list control.

<div id="dbkit.sdk.layout.getunsavedchangesdialogexplanation">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.GetUnsavedChangesDialogExplanation

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

> Returns the explanation text of the dialog the layout shows when it is closed with unsaved changes.

<div id="dbkit.sdk.layout.getunsavedchangesdialogmessage">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.GetUnsavedChangesDialogMessage

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

> Returns the message of the dialog the layout shows when it is closed with unsaved changes.

<div id="dbkit.sdk.layout.getunsavedchangesdialogtitle">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.GetUnsavedChangesDialogTitle

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

> Returns the title of the dialog the layout shows when it is closed with unsaved changes.

<div id="dbkit.sdk.layout.hasrowslistcontrol">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.HasRowsListControl

**HasRowsListControl**() As `Boolean</api/data_types/boolean>`

> Returns True if the layout has a rows list control, such as a `DBKit.Table</api/databases/dbkit/table>`.

<div id="dbkit.sdk.layout.isvalidcolumnname">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.IsValidColumnName

**IsValidColumnName**(columnName As `String</api/data_types/string>`, tableName As `String</api/data_types/string>` = "") As `Boolean</api/data_types/boolean>`

> Returns True if *columnName* is a column of the given table. When *tableName* is empty, the layout's own table is meant. A control uses this to check a column name against the database schema without reaching into DBKit's internals.

<div id="dbkit.sdk.layout.lastrowindex">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.LastRowIndex

**LastRowIndex**() As `Integer</api/data_types/integer>`

> Returns the index of the last of the rows available to the layout.

<div id="dbkit.sdk.layout.layoutcontrols">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.LayoutControls

**LayoutControls**() As Iterable

> Returns all of the controls on the layout, DBKit controls and ordinary controls alike.

<div id="dbkit.sdk.layout.loadselectedrow">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.LoadSelectedRow

**LoadSelectedRow**(rc As `DBKit.SDK.Layout</api/databases/dbkit/sdk/layout>`)

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

> Makes a row the layout's current row: either the row selected in another layout, or the row of the layout's table whose primary key is *primaryKeyValue*.

<div id="dbkit.sdk.layout.movefirst">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.MoveFirst

**MoveFirst**()

> Makes the first of the layout's rows the current row.

<div id="dbkit.sdk.layout.movelast">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.MoveLast

**MoveLast**()

> Makes the last of the layout's rows the current row.

<div id="dbkit.sdk.layout.movenext">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.MoveNext

**MoveNext**()

> Makes the row after the current row the current row.

<div id="dbkit.sdk.layout.moveprevious">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.MovePrevious

**MovePrevious**()

> Makes the row before the current row the current row.

<div id="dbkit.sdk.layout.newrow">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.NewRow

**NewRow**()

> Creates a new row for the layout's table and makes it the current row, in edit mode.

<div id="dbkit.sdk.layout.newrowinseparatelayout">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.NewRowInSeparateLayout

**NewRowInSeparateLayout**() As `Boolean</api/data_types/boolean>`

> Returns True if the layout creates new rows in a separate layout rather than in place.

<div id="dbkit.sdk.layout.primarykeycolumnnamefortable">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.PrimaryKeyColumnNameForTable

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

> Returns the name of the primary key column of the given table. A control uses this to work with a table's primary key without reaching into DBKit's internals.

<div id="dbkit.sdk.layout.raisedatabaseconnectedevent">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.RaiseDatabaseConnectedEvent

**RaiseDatabaseConnectedEvent**()

> Raises the layout's DatabaseConnected event.

<div id="dbkit.sdk.layout.raisedatabaseconnectionlostevent">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.RaiseDatabaseConnectionLostEvent

**RaiseDatabaseConnectionLostEvent**(error As `DatabaseException</api/databases/databaseexception>`) As `Boolean</api/data_types/boolean>`

> Raises the layout's DatabaseDisconnected event. Returns True if the event handler took over recovering from the lost connection itself; when it returns False, DBKit handles the recovery.

<div id="dbkit.sdk.layout.raiseerroreventwithexception">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.RaiseErrorEventWithException

**RaiseErrorEventWithException**(error As `RuntimeException</api/language/runtimeexception>`)

> Raises the layout's Error event, passing *error* to it.

<div id="dbkit.sdk.layout.refreshfromrow">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.RefreshFromRow

**RefreshFromRow**(row As `DBKit.Row</api/databases/dbkit/row>` = Nil)

> Refreshes the layout's controls from *row*. When *row* is Nil, the layout's current row is used.

<div id="dbkit.sdk.layout.rowsavailable">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.RowsAvailable

**RowsAvailable**() As RowSet

> Returns the rows produced by the layout's query.

<div id="dbkit.sdk.layout.rowwithprimarykey">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.RowWithPrimaryKey

**RowWithPrimaryKey**(primaryKey As `String</api/data_types/string>`, theTableName As `String</api/data_types/string>` = "") As `DBKit.Row</api/databases/dbkit/row>`

> Returns the row whose primary key is *primaryKey*, loading it if necessary. When *theTableName* is empty, the layout's own table is meant.

<div id="dbkit.sdk.layout.selectedrowindex">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.SelectedRowIndex

**SelectedRowIndex**() As `Integer</api/data_types/integer>`

**SelectedRowIndex**(Assigns SRI As `Integer</api/data_types/integer>`)

> Returns, or sets, the index of the selected row in the layout's rows list control. It is -1 when no row is selected.

<div id="dbkit.sdk.layout.sendeventtosubscribers">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.SendEventToSubscribers

**SendEventToSubscribers**(theRowEvent As `DBKit.SDK.RowEvent</api/databases/dbkit/sdk/rowevent>`)

> Sends *theRowEvent* to every control subscribed to the layout's row events. See SubscribeToAllRowEvents.

<div id="dbkit.sdk.layout.setfocustofirstcontrol">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.SetFocusToFirstControl

**SetFocusToFirstControl**()

> Moves the focus to the first control on the layout.

<div id="dbkit.sdk.layout.settablename">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.SetTableName

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

> Sets the name of the table the layout works with. DBKit uses this when it creates a layout for a table at runtime.

<div id="dbkit.sdk.layout.sqlitecolumntype">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.SQLiteColumnType

**SQLiteColumnType**(columnName As `String</api/data_types/string>`, SQLiteColumnType As DBKit.SQLiteColumnTypes)

> Declares that a SQLite column is to be treated as a date or a datetime. SQLite does not distinguish the two in its schema, so DBKit cannot tell from the database alone which controls and editing a column needs.

<div id="dbkit.sdk.layout.subscribetoallrowevents">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.SubscribeToAllRowEvents

**SubscribeToAllRowEvents**(subscriber As `DBKit.SDK.RowBase</api/databases/dbkit/sdk/rowbase>`)

> Subscribes a control to the layout's row events, so that its HandleRowEvent method is called for every row event the layout sends.

<div id="dbkit.sdk.layout.tablename">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.TableName

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

> Returns the name of the table the layout works with.

<div id="dbkit.sdk.layout.undorowchanges">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.UndoRowChanges

**UndoRowChanges**()

> Undoes the unsaved changes to the layout's current row, restoring the values it has in the database.

<div id="dbkit.sdk.layout.updatecurrentrow">

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

</div>

<div class="rst-class">

forsearch

</div>

DBKit.SDK.Layout.UpdateCurrentRow

**UpdateCurrentRow**(control As `DBKit.SDK.RowDataControl</api/databases/dbkit/sdk/rowdatacontrol>`)

> Reads the given control's value into the layout's current row. A control whose value the user can change calls this, passing itself, as soon as its value changes; see the Notes on the `DBKit.SDK.RowDataControl</api/databases/dbkit/sdk/rowdatacontrol>` page.

## Compatibility

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

<div id="dbkit.sdk.layout.seealso">

<div class="seealso">

`DBKit SDK</api/databases/dbkit/sdk>` overview, `DBKit.SDK.RowBase</api/databases/dbkit/sdk/rowbase>`, `DBKit.SDK.RowsListControl</api/databases/dbkit/sdk/rowslistcontrol>`.

</div>

</div>
