Gridv5
Used to build document forms in Xpoda. In the Grid, the desired columns can be created in the document with the Add New Field button.

"Grid" tool icon in the Toolbox
How it looks on the canvas
Compatibility
| Free Form | Responsive Form | Mobile |
Notes:
If the Master Record property is Yes, no detail table is created in the database. Otherwise the detail table is created as TABLENAME_DETAIL. Also, to enter data in the grid, we need to add the Grid - Enable Edit Mode operation.
Properties Menu of the Form Tool:


Properties
- Name: The name of the field is written.
- Discount: Enter the number of discounts to be defined for the grid.
- Cost: Enter the number of costs to be defined for the grid.
- Help Text: Text shown as a description when the mouse is moved over the form tool.
- Color: Sets the text colour of the values entered in the form tool.
- Height/Width: Gives the Grid tool a height/width (the width field has been removed from Responsive Forms).
- From Left/Top: Sets the distance of the form tool from the left and top (this field has been removed from Responsive Forms).
- Text Size: Sets the size of the information in the form tool.
- Fit Horizontal: Stretches the form tool to the full screen on the user's screen.
- Pin Right: Pins the form tool to the right.
- Display: Hides the form tool on the screen.
- Detail Button: Adds a detail button to the rows in the Grid.
- Delete Button: Adds a delete button to the rows in the Grid.
- Unchangeable: Prevents the information in the Grid from being changed.
- Master Record: Saves the rows to the main table without creating a Detail table.
- Auto Height: Lets the Grid grow as data is entered.
Actions
- When Row is Selected: Runs when the selected row in the Grid changes.
- When Double Clicked on Row: Runs when the selected row in the Grid is double-clicked.
- Keyboard Input: Runs when any keyboard operation is made.
- When Cell Value Changes: Runs when the value of cells in the Grid changes.
Grid Settings
To add a new column to the Grid or manage existing columns, the Grid Settings area is used.
After selecting the Grid, click the Grid Settings icon on the right. New columns can be created from the panel that opens, and previously created columns can be viewed in the Added Fields area.
To create a new column, define its basic information and click the Save button. Added columns can be selected from the Added Fields area to edit, copy or delete.
For columns, Properties, Events, List and Language and other detailed settings are explained in the Grid Column Properties section.

Grid Column Properties
The properties of columns created in the Grid are managed through Grid Settings After selecting the column to edit from the Added Fields area, the required definitions can be made using its Properties, Events, List and Language sections.
Properties
Properties is where the basic properties of the Grid column are set. Here you can define the column's field type, display name, field name, header properties, alignment, length, default value, format and editability.
Type of Field sets the column's data type, Display Name sets the column header shown on the Grid, and Field Name sets the name of the field to be created in the detail table.
After the changes are saved, the column is shown on the Grid according to these properties.
Events
Events is where the check and operation properties of the Grid column are defined.
Cannot Be Empty sets whether the field can be left empty. Min / Max Value fields set the minimum and maximum values that can be entered. Warning Message sets the warning shown to the user as a result of the check.
In addition, On Focus, Create object when the value changes, Object Mapping and Recording Filter fields let you define additional operations and checks for the column.

List
List is where list properties are defined when a list or drop-down is needed in the Grid column.
List Type sets the list type to use. If a drop-down is created with an SQL query, the query is written in the List Query field.

Language
Language is where the column's translations in other languages are defined.
For each supported language, enter the text to show for the column. When the application language changes, the column header is shown in the translation defined here.
For example, if the column's default name is Customer , then for Turkish enter Müşteri, German enter Kunde and so on.

Adding and Editing Grid Columns
For the column to add to the Grid, write the column header to show on the form in the Display Name field. After defining the required field properties, click the Save button to add the column to the Grid.
The added column appears in the Grid on the design screen. When a column on the Grid is selected, quick action buttons appear above it. With these buttons you can:
- Edit: Edit the properties of the selected column.
- Delete: Delete the selected column from the Grid.
- Move Left: Move the column to the left of the previous column to change its order.
- Move Right: Move the column to the right of the next column to change its order.
So while column properties are managed through Grid Settings the quick action buttons on the Grid let you edit, delete and reorder columns directly.
Studio View:

Client View:

Note: For Grid columns to be editable, the related column properties must also allow editing.
Grid - Enable Edit Mode
Grid - Enable Edit Mode action is used to turn on edit mode on the Grid. When it runs, the user can change the editable fields in the Grid.
When defining the action, the Action Type field sets when the action runs. For example, when When clicked is chosen, Grid edit mode turns on when the related button is clicked.
Operation field, choose Grid - Enable Edit Mode to define the action. If needed, a Run Condition can be set so the action runs only in certain cases.

Adding Data to the Grid
After columns are created in the Grid, data can be entered by adding a new row.
To add a new row to the Grid, the Grid - Add Row action is used. It is usually assigned to a button. When the user clicks the button, a new row is created on the Grid and data can be entered in editable columns.
Grid - Add Row When defining the Actions section of the button, add a new action. After setting when it runs, choose Operation field, choose Grid - Add Row .
Note: For data entry on the Grid, the editability of the related columns must be set appropriately.
After adding the fields to the grid, the grid on the form looks as below;

The Client view of the Grid is as below;

Transferring Data from Form Fields to the Grid
Data can be entered directly in the Grid, and information in fields on the form can also be transferred to the Grid.
When transferring data from form fields to the Grid, field mapping is done in the Grid - Add Row action. With this mapping, the value of a field on the form is transferred to the corresponding Grid column.
For example, the Name field on the form, when mapped to the Grid's Name column, Grid - Add Row action runs and the Name value on the form is transferred to the Grid as a new row.
The point to note here is that the data types of the mapped form field and Grid column must be compatible.
Note: Grid - Add Row For more information about defining the action, field mapping and usage details, see the Grid - Add Row document .

Exporting Grid Data to Excel/PDF and Printing
Data on the Grid can be exported or printed.
On the Client screen, when you right-clickon the Grid, the available operations are shown. With these options the Grid data can be exported to Excel or PDF and printed.

Setting the Number of Digits in Decimal Fields
How many digits after the decimal point numeric values in the Grid show is set with the Decimal Places property.
For the related Grid column, when Format field, choose Decimal Number is chosen, the Decimal Places field appears. The value entered sets the number of digits after the decimal point.
For example, when Decimal Places is set to 2 , numeric values are shown as 1,234.57 format.

Freezing Grid Columns
Locked property is used to freeze certain columns in the Grid.
Grid Settings After selecting the column in Locked enable the property to freeze it. This keeps the column visible in Grids scrolled horizontally.
The width of the column's display area can be adjusted with the Field Length and Table Length properties.
