CRUD operations with the data grid
Last updated
Was this helpful?
Connect a data grid widget to a table from a relational database (either an internal Postgres or external SQL database) to perform create, read, update, and delete (CRUD) operations directly from the UI. The provided template contains all necessary widget bindings, logic functions, and UI feedback configurations out of the box.
Reference videos: Part 1 | Part 2
Open the App Builder.
Click the tags menu (see Deploy and maintain).
Select import and upload the data-grid-crud.hwt file.
Select the imported template and confirm the switch in the popup dialog.
The template handles the logic and data bindings automatically. You only need to define your target table (such as a maintenanceTasks table) and ensure your database is accessible.
Select each function and update the table name parameter to match your specific table.
Verify your database connection. If you use an external SQL database, ensure the connection is active.
If you do not have an existing table, run the defineTable and addRows functions once to initialize the schema and write the initial records.
Understand the underlying wiring to adapt the template for more complex requirements.

Data population: The output of the getTableData function binds directly to the data property of the data grid widget to populate the UI.
Last updated
Was this helpful?
Was this helpful?