Go to Scriptcase store

# Grid Buttons Settings

In addition to the buttons that comes automatically with the applications, you can also create your own buttons. All the buttons are displayed within the application toolbar.

New buttons creation settings

## Creating a new button

To create a new button, click on the “New Button” option and enter a name and a button type.

The button Types are: JavaScript, PHP, Link and Run.

Grid buttons type

## Deleting a button

To delete a button click on Delete icon (represented by a recycle bin image) in the right of the button name, at the application menu under the Buttons option.

Deleting a button

## JavaScript

#### Display Mode

You can configure the display mode of the javascript button in Image, Button or Link.

### Button

Setting up Javascript Button.

Display Mode | You can select the display mode for the javascript button in this option.
Label | Text of the button that will be display in the application while executing.
Hint | Hint message for the button. (Displayed when the mouse hovers the button).
Confirmation Message | Displays a confirmation message when the button is clicked. If not informed this is not informed, no message will appear.
Type | Description of the created button.

### Image

Setting up Javascript Button.

Display Mode | You can select the display mode for the javascript button in this option.
Icon | Allows you to inform the icon that will be displayed on the button while the execution of the application.
Hint | Hint message for the button. (Displayed when the mouse hovers the button).
Confirmation Message | Displays a confirmation message when the button is clicked. If not informed this is not informed, no message will appear.
Type | Description of the created button.

### Link

Setting up Javascript Button.

Display Mode | You can select the display mode for the ajax button in this option.
Label | Text of the button that will be display in the application while executing.
Hint | Hint message for the button. (Displayed when the mouse hovers the button).
Confirmation Message | Displays a confirmation message when the button is clicked. If not informed this is not informed, no message will appear.
CSS Style | Name of the CSS class, style created in the layout editor.
Type | Description of the created button.

### Code Block

Javascript button coding block.

> In this block, only JavaScript is accepted.

## PHP

#### Display Mode

You can configure the display mode of the PHP button in Image, Button or Link.

### Button

Setting up PHP Button.

Display Mode | You can select the display mode for the link button in this option.
Label | Text of the button that will be display in the application while executing.
Hint | Hint message for the button. (Displayed when the mouse hovers the button).
Confirmation Message | Displays a confirmation message when the button is clicked. If not informed this is not informed, no message will appear.
Reload quantity of records | This option is used to update the amount of records in the application.
Type | Description of the created button.
Target | Defines the window destination where the code will run (Open in the same Window, Open in another Window, Modal).

### Image

Setting up PHP Button.

Display Mode | You can select the display mode for the link button in this option.
Icon | Allows you to inform the icon that will be displayed on the button while the execution of the application.
Hint | Hint message for the button. (Displayed when the mouse hovers the button).
Confirmation Message | Displays a confirmation message when the button is clicked. If not informed this is not informed, no message will appear.
Reload quantity of records | This option is used to update the amount of records in the application.
Type | Description of the created button.
Target | Defines the window destination where the code will run (Open in the same Window, Open in another Window, Modal).

### Link

Setting up PHP Button.

Display Mode | You can select the display mode for the link button in this option.
Label | Text of the button that will be display in the application while executing.
Hint | Hint message for the button. (Displayed when the mouse hovers the button).
Confirmation Message | Displays a confirmation message when the button is clicked. If not informed this is not informed, no message will appear.
CSS Style | Name of the CSS class, style created in the layout editor.
Reload quantity of records | This option is used to update the amount of records in the application.
Type | Description of the created button.
Target | Defines the window destination where the code will run (Open in the same Window, Open in another Window, Modal).

### Code Block

*Ajax button coding block. *

> In this block, you can use macros, PHP code and JavaScript.

## Link Button

#### Display Mode

You can configure the display mode of the link button in Image, Button or Link.

### Button

Setting up Link Button.

Display Mode | You can select the display mode for the link button in this option.
Label | Text of the button that will be display in the application while executing.
Hint | Hint message for the button. (Displayed when the mouse hovers the button).
Confirmation Message | Displays a confirmation message when the button is clicked. If not informed this is not informed, no message will appear.
Type | Description of the created button.

### Image

Setting up Link Button.

Display Mode | You can select the display mode for the link button in this option.
Icon | Allows you to inform the icon that will be displayed on the button while the execution of the application.
Hint | Hint message for the button. (Displayed when the mouse hovers the button).
Confirmation Message | Displays a confirmation message when the button is clicked. If not informed this is not informed, no message will appear.
Type | Description of the created button.

### Link

Setting up link Button.

Display Mode | You can select the display mode for the ajax button in this option.
Label | Text of the button that will be display in the application while executing.
Hint | Hint message for the button. (Displayed when the mouse hovers the button).
Confirmation Message | Displays a confirmation message when the button is clicked. If not informed this is not informed, no message will appear.
CSS Style | Name of the CSS class, style created in the layout editor.
Type | Description of the created button.

### Setting up the Link

- Selecting the applications

Choosing the application for the button link.

> You should select an application to be called from the button link.

- Link Parameters

Choosing the parameters for the button link.

Field | Allows you to use an existing field from the current application as a parameter for the link.
Variable | Allows you to use a global variable from the current application as a parameter for the link.
Fixed | Allows you to inform a fixed value as a parameter for the link.
Empty | No value will be passed as a parameter for the link.

- Link Properties ( Grid )

Configuring the properties for the link button when the destined application is a Grid.

Link Operation Mode | How the link will open (Open in the same Window, Open in another Window, Modal ).
Exit URL for the target application | URL or an application that be redirect to when exiting the Grid application.
Initial Mode | Allows you to define the initial mode of the grid application ( Search or Grid ).
Number of Lines | Allows you to define the amount of lines displayed in the Grid.
Number of Columns | Allows you to define the amount of columns displayed in the Grid.
Paging | Enable the paging in the Grid.
Display Header | Enable the Grid Header.
Active Navigation Buttons | Enable the navigation button (First, Back, Next and Last) in the Grid.

- Link Properties ( Form )

Configuring the properties for the link button when the destined application is a Form.

Link Operation Mode | How the link will open (Open in the same Window, Open in another Window, Modal ).
Exit URL for the target application | URL or an application that be redirect to when exiting the Form application.
Enable insert button on target application | Enable the “New” button in the Form Application.
Enable update button on target application | Enable the “Update” button in the Form Application.
Enable delete button on target application | Enable the “Delete” button in the Form Application.
Enable navigation button on target application | Enable the navigation button (First, Back, Next and Last) in the Form.
Enable button to edit a grid record | Enable the buttons that allow you to edit the records of a Grid

## RUN

#### Display options

We can configure “Run” button display as Link, Image or Button:

### Button

Grid’s Run Button settings - Button type

Display Mode | Combo box to select the button display option, you can choose button, image or link.
Label | Application button title (text that will be displayed for the button within the application)
Hint | Using this option you can set a message for the button hint
Confirmation Message | Using this option you can set a confirmation message that will be displayed when the button is pressed. Leave it empty if you don’t need to display any message.
CSS Style | CSS for the the button, if you do not change this option Scriptcase will apply the default application/project CSS. You can customize the buttons’ CSS using the option within the main menu “Layout » CSS Buttons”
Reload quantity of records | Option used to update the amount of application records.
Type | Button type description.
Target | This option allows you to set the target window where you will run the button code (the same window, other window, modal)

### Image

Grid’s Run Button settings - Image type

Display Mode | Combo box to select the button display option, you can choose image, button or link.
Icon | Button display icon. You can use this option to select an image (from Scriptcase images or from you computer) to represents the button within the application toolbar.
Hint | Using this option you can set a message for the button hint
Confirmation Message | Using this option you can set a confirmation message that will be displayed when the button is pressed. Leave it empty if you don’t need to display any message.
Reload quantity of records | Option used to update the amount of application records.
Tipo | Button type description.
Target | This option allows you to set the target window where you will run the button code (the same window, other window, modal)

### Link

Grid’s Run Button settings - Link type

Display Mode | Combo box to select the button display option, you can choose link, button or image.
Label | Text that will be displayed on the button (on running application).
Hint | Application button title (text that will be displayed for the button within the application)
Confirmation Message | By using this option you can set a confirmation message that will be displayed when the button is pressed. Leave it empty if you don’t need to display any message.
CSS Style | CSS class name, style created in the theme buttons editor .
Reload quantity of records | Option used to update the amount of application records.
Type | Button type description.
Target | This option allows you to set the target window where you will run the button code (the same window, other window, modal)

### Coding Area

Grid’s Run Button settings - Coding area

- There are two types of events in the Run button

  - OnRecord : Runs after processing on each record selected.
  - OnFinish : Runs after processing all records selected.

> In this coding area you can use Scriptcase macros, PHP and JavaScript.

#####

#####