Learn how to work with GAPTEQ components that are designed to display database tables or views. You can use them to view, search, filter or sort the tables in your application.
In this article you can read the following:
Note! The Data Grid, Data List & Data Form components are particularly suitable for working with database tables.
1. Create and apply data layer
- Drag and drop the component (data grid in the example) onto the page. You will be informed directly that a data layer is required (“Drag a data layer here”).
Note! The GAPTEQ component “communicates” with a database table via the data layer - i.e. this must be created for all required tables / views.
The data layer can be understood as a kind of “image” of the DB table.
- Use the “New” button in the main menu to create a new data layer via “Data Layer for table”.
- Then select the desired table under “Select a table...” for which the data layer is to be created and save it (the data layer should then be found in the design objects).
-
Drag and drop the desired data layer onto the component in the page.
-
A dialog opens which displays all fields/columns of the selected table. Now select those that are to be displayed in the component.
- After clicking on “OK”, the selected fields are displayed in the table. You can see which table is stored under “Data layer” in the settings/properties of the component.
2. Customize/configure tables
The display of the table columns can be customized at any time.
- Right-click on the data grid to open a dialog (Select columns) under “Add columns”, which can be used to select additional columns at any time.
- To delete one or more columns, right-click on the corresponding column and select “Delete” or the Delete key on the keyboard.
Tip! Many other configuration options for the table columns can be found in the “Column Properties” in the menu bar on the right.