Skip to content

Custom Buttons

Attention

The default "open modal" button will be removed automatically when using one of the following features.

Add custom buttons to the first column of a child-tab table.

Get Children Tab

Basic

1
2
3
4
5
var dv = AppGiniHelper.DV;
dv.ready(function() {
    var tab = ch_tabs.get("subtablename");
    // ...
});

Multiple lookups

Warning

AppGini allows more than one lookup referencing the same master-table. In these cases, we have to define the table name (as 1st parameter) and the specific column name (as 2nd parameter)

1
2
3
4
5
var dv = AppGiniHelper.DV;
dv.ready(function() {
    var tab = ch_tabs.get("subtablename", "linked_column_name");
    // ...
});

Open Modal Button

Customizable buttons, opening the record in a modal dialog

1
2
3
tab.addButtonOpenModal();
tab.addButtonOpenModal("icon"); // optional icon
tab.addButtonOpenModal("icon", "text"); // optional icon and text

Open Button

Customizable links, opening the record in the same page

1
2
3
tab.addButtonOpen();
tab.addButtonOpen("icon"); // optional icon
tab.addButtonOpen("icon", "text"); // optional icon and text

Open href in same browser tab

1
2
tab.addLink("href", "icon");
tab.addLink("href", "icon", "text");

Open href in a different browser tab

1
tab.addLink("href", "icon", "text", "_blank");
1
tab.addLink("url", "icon", "text", "your_tab_name");

Open href in a modal dialog

1
tab.addLinkModal("href", "icon", "text", "Title of dialog")
  • %TN%
    Table name of child table
  • %CN%
    Column name of refering column if there is more than one lookup column in child table referencing the same paret table
  • %PK%
    Primary key of the child table's record
  • %ID% same as %PK%
  • %DVTN%
    Table name of parent table (current Detail View)
  • %DVPK%
    Primary key of selected record of parent table (current Detail View)

See also